diff --git a/src/esp_clock.cpp b/src/esp_clock.cpp index 6849470..afd8ab6 100644 --- a/src/esp_clock.cpp +++ b/src/esp_clock.cpp @@ -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(); } }