summaryrefslogtreecommitdiff
path: root/src/system_fsm/running.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/system_fsm/running.cpp')
-rw-r--r--src/system_fsm/running.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/system_fsm/running.cpp b/src/system_fsm/running.cpp
index 60103086..14c5f28b 100644
--- a/src/system_fsm/running.cpp
+++ b/src/system_fsm/running.cpp
@@ -65,9 +65,11 @@ void Running::react(const SdDetectChanged& ev) {
if (!sStorage && mountStorage()) {
events::Ui().Dispatch(StorageMounted{});
}
- } else {
- unmountStorage();
}
+ // Don't automatically unmount, since this event seems to occasionally happen
+ // supriously. FIXME: Why?
+ // (It doesn't matter too much; by the time we get this event the SD card has
+ // already been disconnected electrically.)
}
void Running::react(const SamdUsbMscChanged& ev) {
@@ -144,6 +146,7 @@ auto Running::mountStorage() -> bool {
}
auto Running::unmountStorage() -> void {
+ ESP_LOGW(kTag, "unmounting storage");
sServices->database({});
sStorage.reset();
}