use better name for stay connected constant
This commit is contained in:
parent
03a1fc0e21
commit
8f6f100fbb
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user