Skip to content

Commit 1ffc377

Browse files
committed
Add NTRIP debug prints
1 parent 81ce858 commit 1ffc377

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Firmware/RTK_Surveyor/NtripClient.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static const int NTRIPCLIENT_MS_BETWEEN_GGA = 5000; //5s between transmission of
6464
//----------------------------------------
6565

6666
//The WiFi connection to the NTRIP caster to obtain RTCM data.
67-
static WiFiClient * ntripClient;
67+
static WiFiClient *ntripClient;
6868

6969
//Throttle the time between connection attempts
7070
//ms - Max of 4,294,967,295 or 4.3M seconds or 71,000 minutes or 1193 hours or 49 days between attempts
@@ -501,7 +501,8 @@ void ntripClientUpdate()
501501
i2cGNSS.pushRawData(rtcmData, rtcmCount);
502502
wifiIncomingRTCM = true;
503503

504-
//if (!inMainMenu) log_d("NTRIP Client received %d RTCM bytes, pushed to ZED", rtcmCount);
504+
if (!inMainMenu && settings.enablePrintNtripClientState)
505+
systemPrintf("NTRIP Client received %d RTCM bytes, pushed to ZED\r\n", rtcmCount);
505506
}
506507
}
507508

Firmware/RTK_Surveyor/NtripServer.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ uint32_t ntripServerBytesSent = 0;
6969

7070
//Throttle the time between connection attempts
7171
//ms - Max of 4,294,967,295 or 4.3M seconds or 71,000 minutes or 1193 hours or 49 days between attempts
72-
static uint32_t ntripServerConnectionAttemptTimeout = 0;
72+
static uint32_t ntripServerConnectionAttemptTimeout = 0;
7373
static uint32_t ntripServerLastConnectionAttempt = 0;
7474

7575
//Last time the NTRIP server state was displayed
@@ -243,7 +243,9 @@ void ntripServerProcessRTCM(uint8_t incoming)
243243
//If we have not gotten new RTCM bytes for a period of time, assume end of frame
244244
if (millis() - ntripServerTimer > 100 && ntripServerBytesSent > 0)
245245
{
246-
if (!inMainMenu) log_d("NTRIP Server transmitted %d RTCM bytes to Caster", ntripServerBytesSent);
246+
if (!inMainMenu && settings.enablePrintNtripServerState)
247+
systemPrintf("NTRIP Server transmitted %d RTCM bytes to Caster\r\n", ntripServerBytesSent);
248+
247249
ntripServerBytesSent = 0;
248250
}
249251

0 commit comments

Comments
 (0)