Skip to content

Commit e427757

Browse files
LeeLeahy2nseidle
authored andcommitted
NTRIP Server: Count all of the RTCM messages
1 parent 2a29d13 commit e427757

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

Firmware/RTK_Surveyor/NtripServer.ino

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,9 @@ bool ntripServerRtcmMessage(uint8_t data)
244244
{
245245
crcState = RTCM_TRANSPORT_STATE_WAIT_FOR_PREAMBLE_D3;
246246

247+
//Account for this message
248+
rtcmPacketsSent++;
249+
247250
//Display the RTCM message header
248251
if (settings.enablePrintNtripServerRtcm && (!inMainMenu))
249252
Serial.printf (" Message %d, %2d bytes\r\n", message, 3 + 1 + length + 3);
@@ -315,15 +318,6 @@ void ntripServerProcessRTCM(uint8_t incoming)
315318
uint32_t currentMilliseconds;
316319
static uint32_t previousMilliseconds = 0;
317320

318-
//Count outgoing packets for display
319-
//Assume 1Hz RTCM transmissions
320-
currentMilliseconds = millis();
321-
if (currentMilliseconds - lastRTCMPacketSent > 500)
322-
{
323-
lastRTCMPacketSent = millis();
324-
rtcmPacketsSent++;
325-
}
326-
327321
//Check for too many digits
328322
if (settings.enableResetDisplay == true)
329323
{
@@ -342,6 +336,7 @@ void ntripServerProcessRTCM(uint8_t incoming)
342336
if (online.rtc)
343337
{
344338
//Timestamp the RTCM messages
339+
currentMilliseconds = millis();
345340
if (settings.enablePrintNtripServerRtcm
346341
&& (!inMainMenu)
347342
&& ((currentMilliseconds - previousMilliseconds) > 1))

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ uint64_t lastLogSize = 0;
368368
bool logIncreasing = false; //Goes true when log file is greater than lastLogSize
369369
bool reuseLastLog = false; //Goes true if we have a reset due to software (rather than POR)
370370

371-
uint32_t lastRTCMPacketSent = 0; //Used to count RTCM packets sent during base mode
372371
uint32_t rtcmPacketsSent = 0; //Used to count RTCM packets sent via processRTCM()
373372

374373
uint32_t maxSurveyInWait_s = 60L * 15L; //Re-start survey-in after X seconds

0 commit comments

Comments
 (0)