Skip to content

Commit 946fd44

Browse files
committed
Better NTRIP Client periodic printing
1 parent 2b5a3c7 commit 946fd44

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Firmware/RTK_Everywhere/NtripClient.ino

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -452,19 +452,19 @@ void ntripClientRestart()
452452
}
453453

454454
// Update the state of the NTRIP client state machine
455+
// PERIODIC_DISPLAY(PD_NTRIP_CLIENT_STATE) is handled by ntripClientUpdate
455456
void ntripClientSetState(uint8_t newState)
456457
{
457-
if (settings.debugNtripClientState || PERIODIC_DISPLAY(PD_NTRIP_CLIENT_STATE))
458+
if (settings.debugNtripClientState)
458459
{
459460
if (ntripClientState == newState)
460-
systemPrint("*");
461+
systemPrint("NTRIP Client: *");
461462
else
462-
systemPrintf("%s --> ", ntripClientStateName[ntripClientState]);
463+
systemPrintf("NTRIP Client: %s --> ", ntripClientStateName[ntripClientState]);
463464
}
464465
ntripClientState = newState;
465-
if (settings.debugNtripClientState || PERIODIC_DISPLAY(PD_NTRIP_CLIENT_STATE))
466+
if (settings.debugNtripClientState)
466467
{
467-
PERIODIC_CLEAR(PD_NTRIP_CLIENT_STATE);
468468
if (newState >= NTRIP_CLIENT_STATE_MAX)
469469
{
470470
systemPrintf("Unknown NTRIP Client state: %d\r\n", newState);
@@ -860,7 +860,10 @@ void ntripClientUpdate()
860860

861861
// Periodically display the NTRIP client state
862862
if (PERIODIC_DISPLAY(PD_NTRIP_CLIENT_STATE))
863-
ntripClientSetState(ntripClientState);
863+
{
864+
systemPrintf("NTRIP Client state: %s\r\n", ntripClientStateName[ntripClientState]);
865+
PERIODIC_CLEAR(PD_NTRIP_CLIENT_STATE);
866+
}
864867
}
865868

866869
// Verify the NTRIP client tables

0 commit comments

Comments
 (0)