Testing results for LilyGO RMA
This commit is contained in:
parent
8047640ea3
commit
dd41645784
1 changed files with 20 additions and 3 deletions
|
|
@ -827,12 +827,18 @@ static void updateWaitDiscipline() {
|
|||
}
|
||||
|
||||
static void updateRun() {
|
||||
uint32_t now = millis();
|
||||
|
||||
if (!g_sd.isMounted()) {
|
||||
enterWaitSdState();
|
||||
return;
|
||||
if ((uint32_t)(now - g_lastWarnMs) >= kSdMessagePeriodMs) {
|
||||
g_lastWarnMs = now;
|
||||
oledShowLines("SD removed", "Logging paused", "LoRa continues");
|
||||
}
|
||||
} else if (!g_sessionReady) {
|
||||
// Card came back while running. Resume append logging without pausing radio work.
|
||||
(void)openSessionLogs();
|
||||
}
|
||||
|
||||
uint32_t now = millis();
|
||||
if ((uint32_t)(now - g_lastHealthCheckMs) >= kHealthCheckPeriodMs) {
|
||||
g_lastHealthCheckMs = now;
|
||||
if (isDisciplineStale()) {
|
||||
|
|
@ -893,10 +899,21 @@ void loop() {
|
|||
if (g_sd.consumeMountedEvent()) {
|
||||
logf("SD mounted");
|
||||
g_gpsPathReady = false;
|
||||
if (g_phase == AppPhase::RUN) {
|
||||
g_lastWarnMs = 0;
|
||||
if (!g_sessionReady) {
|
||||
(void)openSessionLogs();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (g_sd.consumeRemovedEvent()) {
|
||||
logf("SD removed");
|
||||
g_gpsPathReady = false;
|
||||
if (g_phase == AppPhase::RUN) {
|
||||
closeSessionLogs();
|
||||
g_lastWarnMs = 0;
|
||||
oledShowLines("SD removed", "Logging paused", "LoRa continues");
|
||||
}
|
||||
}
|
||||
|
||||
if (!g_radioReady) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue