Change the OTA update period use timestamp to bootCount

This commit is contained in:
Phat Nguyen
2024-05-15 17:09:06 +07:00
parent a71c038864
commit 563bdfe4b2
5 changed files with 17 additions and 75 deletions

View File

@ -1,6 +1,5 @@
#include "AgWiFiConnector.h"
#include "Libraries/WiFiManager/WiFiManager.h"
#include <time.h>
#define WIFI_CONNECT_COUNTDOWN_MAX 180
#define WIFI_HOTSPOT_PASSWORD_DEFAULT "cleanair"
@ -159,11 +158,6 @@ bool WifiConnector::connect(void) {
config.setPostToAirGradient(result != "T");
}
hasPortalConfig = false;
/** Configure internet time */
const char *ntp_server = "pool.ntp.org";
configTime(0, 0, ntp_server);
logInfo("Set internet time server: " + String(ntp_server));
}
#else
_wifiProcess();