Implement regular OTA update attempt / indicate OTA processing on display

This commit is contained in:
Phat Nguyen
2024-05-02 10:19:49 +07:00
parent 0acb7d470d
commit 4493156739
10 changed files with 252 additions and 10 deletions

View File

@ -1,5 +1,6 @@
#include "AgWiFiConnector.h"
#include "Libraries/WiFiManager/WiFiManager.h"
#include <time.h>
#define WIFI_CONNECT_COUNTDOWN_MAX 180
#define WIFI_HOTSPOT_PASSWORD_DEFAULT "cleanair"
@ -158,6 +159,11 @@ 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();