Skip to content

Commit 40b3d29

Browse files
committed
Fix uptime
1 parent db1412f commit 40b3d29

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,6 @@ unsigned long rtcWaitTime = 0; //At poweron, we give the RTC a few seconds to up
454454
TaskHandle_t idleTaskHandle[MAX_CPU_CORES];
455455
uint32_t max_idle_count = MAX_IDLE_TIME_COUNT;
456456

457-
uint64_t uptime;
458-
uint32_t previousMilliseconds;
459457
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
460458
/*
461459
+---------------------------------------+ +----------+

Firmware/RTK_Surveyor/menuSystem.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void menuSystem()
107107
Serial.println();
108108

109109
//Display the uptime
110-
uint64_t uptimeMilliseconds = uptime;
110+
uint64_t uptimeMilliseconds = millis();
111111
uint32_t uptimeDays = 0;
112112
while (uptimeMilliseconds >= MILLISECONDS_IN_A_DAY) {
113113
uptimeMilliseconds -= MILLISECONDS_IN_A_DAY;
@@ -129,12 +129,13 @@ void menuSystem()
129129
uptimeSeconds += 1;
130130
}
131131
Serial.print("Uptime: ");
132-
Serial.printf("%d %02d:%02d:%02d.%03lld\r\n",
132+
Serial.printf("%d %02d:%02d:%02d.%03lld (Resets: %d)\r\n",
133133
uptimeDays,
134134
uptimeHours,
135135
uptimeMinutes,
136136
uptimeSeconds,
137-
uptimeMilliseconds);
137+
uptimeMilliseconds,
138+
settings.resetCount);
138139

139140
if (settings.enableSD == true)
140141
{

0 commit comments

Comments
 (0)