Skip to content

Commit f520755

Browse files
committed
Update ntripServerTimer - when using Ethernet
1 parent 9584b56 commit f520755

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Firmware/RTK_Surveyor/NtripServer.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ void ntripServerProcessRTCM(uint8_t incoming)
249249
}
250250

251251
// If we have not gotten new RTCM bytes for a period of time, assume end of frame
252-
if (millis() - ntripServerTimer > 100 && ntripServerBytesSent > 0)
252+
if (((millis() - ntripServerTimer) > 100) && (ntripServerBytesSent > 0))
253253
{
254254
if ((!inMainMenu) && settings.enablePrintNtripServerState)
255255
systemPrintf("NTRIP Server transmitted %d RTCM bytes to Caster\r\n", ntripServerBytesSent);
@@ -391,6 +391,7 @@ void ntripServerUpdate()
391391
{
392392
ntripServerLastConnectionAttempt = millis();
393393
log_d("NTRIP Server starting on Ethernet");
394+
ntripServerTimer = millis();
394395
ntripServerSetState(NTRIP_SERVER_WIFI_ETHERNET_STARTED);
395396
}
396397
}
@@ -543,7 +544,7 @@ void ntripServerUpdate()
543544
// Look for banned IP information
544545
else if (strstr(response, "banned") != nullptr) //'Banned' found
545546
{
546-
systemPrintf("NTRIP Server connected to caster but caster responded with problem: %s", response);
547+
systemPrintf("NTRIP Server connected to caster but caster responded with problem: %s\r\n", response);
547548

548549
// Give up - Shutdown NTRIP server, no further retries
549550
ntripServerStop(true);
@@ -552,7 +553,7 @@ void ntripServerUpdate()
552553
// Other errors returned by the caster
553554
else
554555
{
555-
systemPrintf("NTRIP Server connected but caster responded with problem: %s", response);
556+
systemPrintf("NTRIP Server connected but caster responded with problem: %s\r\n", response);
556557

557558
// Check for connection limit
558559
if (ntripServerConnectLimitReached())

0 commit comments

Comments
 (0)