File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed
Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -631,6 +631,7 @@ uint32_t lastRTCAttempt = 0; // Wait 1000ms between checking GNSS for curre
631631uint32_t lastRTCSync = 0 ; // Time in millis when the RTC was last sync'd
632632bool rtcSyncd = false ; // Set to true when the RTC has been sync'd via TP pulse
633633uint32_t lastPrintPosition = 0 ; // For periodic display of the position
634+ uint32_t lastPrintState = 0 ; // For periodic display of the RTK state (solution)
634635
635636uint32_t lastBaseIconUpdate = 0 ;
636637bool baseIconDisplayed = false ; // Toggles as lastBaseIconUpdate goes above 1000ms
@@ -1033,6 +1034,9 @@ void loop()
10331034 DMW_c (" printPosition" );
10341035 printPosition (); // Periodically print GNSS coordinates if enabled
10351036
1037+ DMW_c (" printRTKState" );
1038+ printRTKState (); // Periodically print RTK state (solution) if enabled
1039+
10361040 // A small delay prevents panic if no other I2C or functions are called
10371041 delay (10 );
10381042}
Original file line number Diff line number Diff line change @@ -883,6 +883,17 @@ void printPosition()
883883 }
884884}
885885
886+ // Periodically print RTK state if enabled
887+ void printRTKState ()
888+ {
889+ // Periodically print the RTK state
890+ if (settings.enablePrintState && ((millis () - lastPrintState) > 15000 ))
891+ {
892+ printCurrentRTKState ();
893+ lastPrintState = millis ();
894+ }
895+ }
896+
886897// Given a user's string, try to identify the type and return the coordinate in DD.ddddddddd format
887898CoordinateInputType coordinateIdentifyInputType (const char *userEntryOriginal, double *coordinate)
888899{
Original file line number Diff line number Diff line change @@ -1430,6 +1430,28 @@ void printCurrentConditions()
14301430 }
14311431}
14321432
1433+ void printCurrentRTKState ()
1434+ {
1435+ if (online.gnss == true )
1436+ {
1437+ systemPrint (" RTK solution: " );
1438+
1439+ if (carrSoln == 0 ) // No RTK
1440+ systemPrint (" NONE" );
1441+
1442+ else if (carrSoln == 1 ) // RTK Float
1443+ systemPrint (" FLOAT" );
1444+
1445+ else if (carrSoln == 2 ) // RTK Fix
1446+ systemPrint (" FIX" );
1447+
1448+ else
1449+ systemPrint (" UNKNOWN!" );
1450+
1451+ systemPrintln ();
1452+ }
1453+ }
1454+
14331455void printCurrentConditionsNMEA ()
14341456{
14351457 if (online.gnss == true )
You can’t perform that action at this time.
0 commit comments