Skip to content

Commit 37b9da2

Browse files
committed
Restart NTRIP if WiFi connect failed.
Fix for #429
1 parent 73451d5 commit 37b9da2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Firmware/RTK_Surveyor/NtripClient.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,10 @@ void ntripClientUpdate()
428428
if (wifiIsConnected())
429429
ntripClientSetState(NTRIP_CLIENT_WIFI_ETHERNET_CONNECTED);
430430
else if (wifiState == WIFI_OFF)
431-
ntripClientSetState(NTRIP_CLIENT_OFF);
431+
{
432+
//WiFi failed to connect. Restart Client which will restart WiFi.
433+
ntripClientSetState(NTRIP_CLIENT_ON);
434+
}
432435
}
433436
break;
434437

Firmware/RTK_Surveyor/NtripServer.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,10 @@ void ntripServerUpdate()
424424
if (wifiIsConnected())
425425
ntripServerSetState(NTRIP_SERVER_WIFI_ETHERNET_CONNECTED);
426426
else if (wifiState == WIFI_OFF)
427-
ntripServerSetState(NTRIP_SERVER_OFF);
427+
{
428+
//WiFi failed to connect. Restart Client which will restart WiFi.
429+
ntripServerSetState(NTRIP_SERVER_ON);
430+
}
428431
}
429432
break;
430433

0 commit comments

Comments
 (0)