use better name for stay connected constant

This commit is contained in:
Nicu Hodos 2020-11-04 16:57:30 +01:00
parent 03a1fc0e21
commit 8f6f100fbb

View File

@ -4,7 +4,7 @@
#include "ntp_time.h"
#include "display.h"
#define STAY_CONNECTED_FOR_MINS(min) (min*60)
#define STAY_CONNECTED_AFTER_BOOT 1*60
int currentHour = -1;
time_t timeAtStartup;
@ -35,7 +35,7 @@ void loop() {
}
if (WiFi.status() == WL_CONNECTED) {
ArduinoOTA.handle();
if (difftime(now(), timeAtStartup) > STAY_CONNECTED_FOR_MINS(1)) {
if (difftime(now(), timeAtStartup) > STAY_CONNECTED_AFTER_BOOT) {
wifi.disconnect();
}
}