File tree Expand file tree Collapse file tree 5 files changed +25
-0
lines changed Expand file tree Collapse file tree 5 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,8 @@ void beginBoard()
112112 else
113113 {
114114 reuseLastLog = true ; // Attempt to reuse previous log
115+ settings.resetCount ++;
116+ recordSystemSettings (); // Record to NVM
115117
116118 Serial.print (" Reset reason: " );
117119 switch (esp_reset_reason ())
Original file line number Diff line number Diff line change @@ -444,6 +444,13 @@ void paintSIV()
444444 {
445445 oled.print (i2cGNSS.getSIV ());
446446 }
447+
448+ if (settings.enableResetDisplay == true )
449+ {
450+ oled.setFontType (0 ); // Small font
451+ oled.setCursor (16 + (8 * 3 ) + 6 , 38 ); // x, y
452+ oled.print (settings.resetCount );
453+ }
447454 }
448455}
449456
Original file line number Diff line number Diff line change @@ -140,6 +140,8 @@ void recordSystemSettingsToFile()
140140 settingsFile.println (" lastState=" + (String)settings.lastState );
141141 settingsFile.println (" throttleDuringSPPCongestion=" + (String)settings.throttleDuringSPPCongestion );
142142 settingsFile.println (" autoIMUmountAlignment=" + (String)settings.autoIMUmountAlignment );
143+ settingsFile.println (" enableResetDisplay=" + (String)settings.enableResetDisplay );
144+ settingsFile.println (" resetCount=" + (String)settings.resetCount );
143145
144146 // Record constellation settings
145147 for (int x = 0 ; x < MAX_CONSTELLATIONS ; x++)
@@ -404,6 +406,10 @@ bool parseLine(char* str) {
404406 settings.throttleDuringSPPCongestion = d;
405407 else if (strcmp (settingName, " autoIMUmountAlignment" ) == 0 )
406408 settings.autoIMUmountAlignment = d;
409+ else if (strcmp (settingName, " enableResetDisplay" ) == 0 )
410+ settings.enableResetDisplay = d;
411+ else if (strcmp (settingName, " resetCount" ) == 0 )
412+ settings.resetCount = d;
407413
408414 // Check for bulk settings (constellations and message rates)
409415 // Must be last on else list
Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ void menuDebug()
3434 if (settings.throttleDuringSPPCongestion == true ) Serial.println (F (" Enabled" ));
3535 else Serial.println (F (" Disabled" ));
3636
37+ Serial.print (F (" 8) Display Reset Counter: " ));
38+ if (settings.enableResetDisplay == true ) Serial.println (F (" Enabled" ));
39+ else Serial.println (F (" Disabled" ));
40+
3741 Serial.println (F (" x) Exit" ));
3842
3943 byte incoming = getByteChoice (menuTimeout); // Timeout after x seconds
@@ -98,6 +102,10 @@ void menuDebug()
98102 {
99103 settings.throttleDuringSPPCongestion ^= 1 ;
100104 }
105+ else if (incoming == ' 8' )
106+ {
107+ settings.enableResetDisplay ^= 1 ;
108+ }
101109 else if (incoming == ' x' )
102110 break ;
103111 else if (incoming == STATUS_GETBYTE_TIMEOUT)
Original file line number Diff line number Diff line change @@ -333,6 +333,8 @@ struct struct_settings {
333333 bool throttleDuringSPPCongestion = true;
334334 ubxConstellation ubxConstellations ; //Constellations monitored/used for fix
335335 bool autoIMUmountAlignment = true;
336+ bool enableResetDisplay = false;
337+ uint8_t resetCount = 0 ;
336338} settings ;
337339
338340//These are the devices on board RTK Surveyor that may be on or offline.
You can’t perform that action at this time.
0 commit comments