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()
112
112
else
113
113
{
114
114
reuseLastLog = true ; // Attempt to reuse previous log
115
+ settings.resetCount ++;
116
+ recordSystemSettings (); // Record to NVM
115
117
116
118
Serial.print (" Reset reason: " );
117
119
switch (esp_reset_reason ())
Original file line number Diff line number Diff line change @@ -444,6 +444,13 @@ void paintSIV()
444
444
{
445
445
oled.print (i2cGNSS.getSIV ());
446
446
}
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
+ }
447
454
}
448
455
}
449
456
Original file line number Diff line number Diff line change @@ -140,6 +140,8 @@ void recordSystemSettingsToFile()
140
140
settingsFile.println (" lastState=" + (String)settings.lastState );
141
141
settingsFile.println (" throttleDuringSPPCongestion=" + (String)settings.throttleDuringSPPCongestion );
142
142
settingsFile.println (" autoIMUmountAlignment=" + (String)settings.autoIMUmountAlignment );
143
+ settingsFile.println (" enableResetDisplay=" + (String)settings.enableResetDisplay );
144
+ settingsFile.println (" resetCount=" + (String)settings.resetCount );
143
145
144
146
// Record constellation settings
145
147
for (int x = 0 ; x < MAX_CONSTELLATIONS ; x++)
@@ -404,6 +406,10 @@ bool parseLine(char* str) {
404
406
settings.throttleDuringSPPCongestion = d;
405
407
else if (strcmp (settingName, " autoIMUmountAlignment" ) == 0 )
406
408
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;
407
413
408
414
// Check for bulk settings (constellations and message rates)
409
415
// Must be last on else list
Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ void menuDebug()
34
34
if (settings.throttleDuringSPPCongestion == true ) Serial.println (F (" Enabled" ));
35
35
else Serial.println (F (" Disabled" ));
36
36
37
+ Serial.print (F (" 8) Display Reset Counter: " ));
38
+ if (settings.enableResetDisplay == true ) Serial.println (F (" Enabled" ));
39
+ else Serial.println (F (" Disabled" ));
40
+
37
41
Serial.println (F (" x) Exit" ));
38
42
39
43
byte incoming = getByteChoice (menuTimeout); // Timeout after x seconds
@@ -98,6 +102,10 @@ void menuDebug()
98
102
{
99
103
settings.throttleDuringSPPCongestion ^= 1 ;
100
104
}
105
+ else if (incoming == ' 8' )
106
+ {
107
+ settings.enableResetDisplay ^= 1 ;
108
+ }
101
109
else if (incoming == ' x' )
102
110
break ;
103
111
else if (incoming == STATUS_GETBYTE_TIMEOUT)
Original file line number Diff line number Diff line change @@ -333,6 +333,8 @@ struct struct_settings {
333
333
bool throttleDuringSPPCongestion = true;
334
334
ubxConstellation ubxConstellations ; //Constellations monitored/used for fix
335
335
bool autoIMUmountAlignment = true;
336
+ bool enableResetDisplay = false;
337
+ uint8_t resetCount = 0 ;
336
338
} settings ;
337
339
338
340
//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