Skip to content

Commit 61f5ead

Browse files
committed
Remove ntripServer lastConnectionAttempt - it is never set!
lastConnectionAttempt looks like very old code from RTK Firmware The reconnect delay is handled by NTRIP_SERVER_CONNECTING
1 parent 30c5fbe commit 61f5ead

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Firmware/RTK_Everywhere/NtripServer.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,7 @@ void ntripServerUpdate(int serverIndex)
683683
// Failed to connect to to the network, attempt to restart the network
684684
ntripServerRestart(serverIndex);
685685

686-
else if (settings.enableNtripServer &&
687-
((millis() - ntripServer->lastConnectionAttempt) > ntripServer->connectionAttemptTimeout))
686+
else if (settings.enableNtripServer)
688687
{
689688
// No RTCM correction data sent yet
690689
rtcmPacketsSent = 0;

Firmware/RTK_Everywhere/settings.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ typedef struct
398398
// Throttle the time between connection attempts
399399
// ms - Max of 4,294,967,295 or 4.3M seconds or 71,000 minutes or 1193 hours or 49 days between attempts
400400
volatile uint32_t connectionAttemptTimeout;
401-
volatile uint32_t lastConnectionAttempt;
402401
volatile int connectionAttempts; // Count the number of connection attempts between restarts
403402

404403
// NTRIP server timer usage:
@@ -416,6 +415,8 @@ typedef struct
416415

417416

418417
// Protect all methods that manipulate timer with a mutex - to avoid race conditions
418+
// Remember that data is pushed to the servers by
419+
// gnssReadTask -> processUart1Message -> processRTCM -> ntripServerProcessRTCM
419420
SemaphoreHandle_t serverSemaphore = NULL;
420421

421422
unsigned long millisSinceTimer()

0 commit comments

Comments
 (0)