Skip to content

Commit e6f8bbc

Browse files
authored
Merge pull request #662 from LeeLeahy2/ns-bytes-sent
NTRIP Server: Add zedBytesSent value
2 parents e4ef984 + 40c0210 commit e6f8bbc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Firmware/RTK_Surveyor/NtripServer.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ void ntripServerPrintStatus ()
379379
// This function gets called as each RTCM byte comes in
380380
void ntripServerProcessRTCM(uint8_t incoming)
381381
{
382+
static uint32_t zedBytesSent;
383+
382384
if (ntripServerState == NTRIP_SERVER_CASTING)
383385
{
384386
// Generate and print timestamp if needed
@@ -400,7 +402,8 @@ void ntripServerProcessRTCM(uint8_t incoming)
400402
struct tm timeinfo = rtc.getTimeStruct();
401403
char timestamp[30];
402404
strftime(timestamp, sizeof(timestamp), "%Y-%m-%d %H:%M:%S", &timeinfo);
403-
systemPrintf(" Tx RTCM: %s.%03ld, %d bytes sent\r\n", timestamp, rtc.getMillis(), ntripServerBytesSent);
405+
systemPrintf(" Tx RTCM: %s.%03ld, %d bytes sent\r\n", timestamp, rtc.getMillis(), zedBytesSent);
406+
zedBytesSent = 0;
404407
}
405408
previousMilliseconds = currentMilliseconds;
406409
}
@@ -418,6 +421,7 @@ void ntripServerProcessRTCM(uint8_t incoming)
418421
{
419422
ntripServer->write(incoming); // Send this byte to socket
420423
ntripServerBytesSent++;
424+
zedBytesSent++;
421425
ntripServerTimer = millis();
422426
netOutgoingRTCM = true;
423427
}

0 commit comments

Comments
 (0)