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
631
631
uint32_t lastRTCSync = 0 ; // Time in millis when the RTC was last sync'd
632
632
bool rtcSyncd = false ; // Set to true when the RTC has been sync'd via TP pulse
633
633
uint32_t lastPrintPosition = 0 ; // For periodic display of the position
634
+ uint32_t lastPrintState = 0 ; // For periodic display of the RTK state (solution)
634
635
635
636
uint32_t lastBaseIconUpdate = 0 ;
636
637
bool baseIconDisplayed = false ; // Toggles as lastBaseIconUpdate goes above 1000ms
@@ -1033,6 +1034,9 @@ void loop()
1033
1034
DMW_c (" printPosition" );
1034
1035
printPosition (); // Periodically print GNSS coordinates if enabled
1035
1036
1037
+ DMW_c (" printRTKState" );
1038
+ printRTKState (); // Periodically print RTK state (solution) if enabled
1039
+
1036
1040
// A small delay prevents panic if no other I2C or functions are called
1037
1041
delay (10 );
1038
1042
}
Original file line number Diff line number Diff line change @@ -883,6 +883,17 @@ void printPosition()
883
883
}
884
884
}
885
885
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
+
886
897
// Given a user's string, try to identify the type and return the coordinate in DD.ddddddddd format
887
898
CoordinateInputType coordinateIdentifyInputType (const char *userEntryOriginal, double *coordinate)
888
899
{
Original file line number Diff line number Diff line change @@ -1430,6 +1430,28 @@ void printCurrentConditions()
1430
1430
}
1431
1431
}
1432
1432
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
+
1433
1455
void printCurrentConditionsNMEA ()
1434
1456
{
1435
1457
if (online.gnss == true )
You can’t perform that action at this time.
0 commit comments