From 8f6f100fbbe2824099789c7d7ad8965334b7e73e Mon Sep 17 00:00:00 2001 From: Nicolae Hodos Date: Wed, 4 Nov 2020 16:57:30 +0100 Subject: [PATCH] use better name for stay connected constant --- src/esp_clock.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } }