Skip to content

Commit 58dd073

Browse files
committed
Allow delayed WiFi start if we fail to connect to AP
1 parent 4b245fc commit 58dd073

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Firmware/RTK_Everywhere/WiFi.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,11 @@ void wifiStationUpdate()
10641064
if (settings.debugWifiState)
10651065
systemPrintf("WiFi: WiFi station failed to start!\r\n");
10661066

1067+
// Restart WiFi after delay
1068+
// Clear the bits to perform the restart operation
1069+
wifi.clearStarted(WIFI_STA_RECONNECT);
1070+
wifiStationSetState(WIFI_STATION_STATE_RESTART);
1071+
10671072
// Start the next network interface if necessary
10681073
if (connectionAttempts >= 2)
10691074
networkStartNextInterface(NETWORK_WIFI_STATION);

0 commit comments

Comments
 (0)