Skip to content

Commit 26f1d9d

Browse files
committed
NTRIP Server: Throttle (do not give up) if SSID is not found
1 parent 236fe4e commit 26f1d9d

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

Firmware/RTK_Surveyor/NtripServer.ino

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -381,20 +381,12 @@ void ntripServerUpdate()
381381
case NTRIP_SERVER_WIFI_CONNECTING:
382382
if (!wifiIsConnected())
383383
{
384-
//Stop if SSID is not detected
385-
if (wifiGetStatus() == WL_NO_SSID_AVAIL)
384+
//Throttle if SSID is not detected
385+
if (wifiConnectionTimeout() || wifiGetStatus() == WL_NO_SSID_AVAIL)
386386
{
387-
Serial.printf("WiFi network '%s' not found\n\r", settings.ntripServer_wifiSSID);
387+
if (wifiGetStatus() == WL_NO_SSID_AVAIL)
388+
Serial.printf("WiFi network '%s' not found\n\r", settings.ntripServer_wifiSSID);
388389

389-
wifiStop();
390-
391-
paintNtripWiFiFail(4000, false); //True = 'Client', False = 'Server'
392-
393-
ntripServerStop(true); //Do not allocate new wifiClient
394-
}
395-
else if (wifiConnectionTimeout())
396-
{
397-
//Assume AP weak signal, the AP is unable to respond successfully
398390
if (ntripServerConnectLimitReached())
399391
{
400392
Serial.println("NTRIP Server failed to get WiFi. Are your WiFi credentials correct?");

0 commit comments

Comments
 (0)