Removing option for auto reboot on wifi error

This commit is contained in:
Gunnar Skjold
2023-11-25 10:31:21 +01:00
parent 2b0626b203
commit 0e6abd0f18
6 changed files with 12 additions and 26 deletions

View File

@@ -151,7 +151,6 @@ EnergyAccountingRealtimeData rtd;
#endif
EnergyAccounting ea(&Debug, &rtd);
uint8_t wifiReconnectCount = 0;
bool wifiDisable11b = false;
HDLCParser *hdlcParser = NULL;
@@ -548,7 +547,6 @@ void loop() {
Debug.stop();
WiFi_connect();
} else {
wifiReconnectCount = 0;
if(!wifiConnected) {
WiFi_post_connect();
}
@@ -1537,11 +1535,6 @@ void WiFi_connect() {
}
if(WiFi.getMode() != WIFI_OFF) {
if(wifiReconnectCount > 3 && wifi.autoreboot) {
if (Debug.isActive(RemoteDebug::INFO)) debugI_P(PSTR("Unable to connect to WiFi, rebooting because auto reboot is enabled"));
ESP.restart();
return;
}
WiFi_disconnect(5000);
return;
}
@@ -1550,8 +1543,6 @@ void WiFi_connect() {
if (Debug.isActive(RemoteDebug::INFO)) debugI_P(PSTR("Connecting to WiFi network: %s"), wifi.ssid);
wifiReconnectCount++;
#if defined(ESP32)
if(strlen(wifi.hostname) > 0) {
WiFi.setHostname(wifi.hostname);