Skip to content

Commit 4489e48

Browse files
committed
Add "ethernet not connected" diag message - to show where NTRIP Client is stuck
1 parent ade0765 commit 4489e48

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Firmware/RTK_Surveyor/NtripClient.ino

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,9 @@ bool ntripClientConnectLimitReached()
169169
ntripClientStop(false); // Allocate new wifiClient
170170

171171
// Retry the connection a few times
172-
bool limitReached = false;
173-
if (ntripClientConnectionAttempts++ >= MAX_NTRIP_CLIENT_CONNECTION_ATTEMPTS)
174-
limitReached = true;
172+
bool limitReached = (ntripClientConnectionAttempts >= MAX_NTRIP_CLIENT_CONNECTION_ATTEMPTS);
175173

174+
ntripClientConnectionAttempts++;
176175
ntripClientConnectionAttemptsTotal++;
177176

178177
if (limitReached == false)
@@ -434,6 +433,12 @@ void ntripClientUpdate()
434433
else
435434
{
436435
// Wait for ethernet to connect
436+
static unsigned long lastDebug = millis();
437+
if (millis() > (lastDebug + 5000))
438+
{
439+
lastDebug = millis();
440+
log_d("NTRIP Client: Ethernet not connected. Waiting to retry.");
441+
}
437442
}
438443
}
439444
else

0 commit comments

Comments
 (0)