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() {
|
static void updateRun() {
|
||||||
|
uint32_t now = millis();
|
||||||
|
|
||||||
if (!g_sd.isMounted()) {
|
if (!g_sd.isMounted()) {
|
||||||
enterWaitSdState();
|
if ((uint32_t)(now - g_lastWarnMs) >= kSdMessagePeriodMs) {
|
||||||
return;
|
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) {
|
if ((uint32_t)(now - g_lastHealthCheckMs) >= kHealthCheckPeriodMs) {
|
||||||
g_lastHealthCheckMs = now;
|
g_lastHealthCheckMs = now;
|
||||||
if (isDisciplineStale()) {
|
if (isDisciplineStale()) {
|
||||||
|
|
@ -893,10 +899,21 @@ void loop() {
|
||||||
if (g_sd.consumeMountedEvent()) {
|
if (g_sd.consumeMountedEvent()) {
|
||||||
logf("SD mounted");
|
logf("SD mounted");
|
||||||
g_gpsPathReady = false;
|
g_gpsPathReady = false;
|
||||||
|
if (g_phase == AppPhase::RUN) {
|
||||||
|
g_lastWarnMs = 0;
|
||||||
|
if (!g_sessionReady) {
|
||||||
|
(void)openSessionLogs();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (g_sd.consumeRemovedEvent()) {
|
if (g_sd.consumeRemovedEvent()) {
|
||||||
logf("SD removed");
|
logf("SD removed");
|
||||||
g_gpsPathReady = false;
|
g_gpsPathReady = false;
|
||||||
|
if (g_phase == AppPhase::RUN) {
|
||||||
|
closeSessionLogs();
|
||||||
|
g_lastWarnMs = 0;
|
||||||
|
oledShowLines("SD removed", "Logging paused", "LoRa continues");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_radioReady) {
|
if (!g_radioReady) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue