Skip to content

Commit e4bec3e

Browse files
committed
WiFi: Prepare menuWiFi for the new WiFi layer
1 parent 4568c5c commit e4bec3e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Firmware/RTK_Everywhere/WiFi.ino

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ static WiFiMulti *wifiMulti;
378378
// Enable TCP connections
379379
void menuWiFi()
380380
{
381+
bool wifiRestartRequested; // Restart WiFi if user changes anything
382+
381383
while (1)
382384
{
383385
networkDisplayInterface(NETWORK_WIFI_STATION);
@@ -419,12 +421,13 @@ void menuWiFi()
419421
}
420422

421423
// If we are modifying the SSID table, force restart of WiFi
422-
restartWiFi = true;
424+
wifiRestartRequested = true;
425+
wifiFailedConnectionAttempts = 0;
423426
}
424427
else if (incoming == 'a')
425428
{
426429
settings.wifiConfigOverAP ^= 1;
427-
restartWiFi = true;
430+
wifiRestartRequested = true;
428431
}
429432
else if (incoming == 'c')
430433
{
@@ -447,6 +450,7 @@ void menuWiFi()
447450
strcpy(settings.wifiNetworks[x].password, "");
448451
}
449452

453+
restartWiFi = wifiRestartRequested;
450454
clearBuffer(); // Empty buffer of any newline chars
451455
}
452456

0 commit comments

Comments
 (0)