diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-01-31 16:54:24 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-01-31 16:54:24 +1100 |
| commit | 587c585ba617304c841f294742ab9d459da608a0 (patch) | |
| tree | 7f85e7a31e5ca8b60238cdc937332d68e6ea454e /src | |
| parent | 816c30afb51fecdd62b08a5e7cdb84aa832d6112 (diff) | |
| download | tangara-fw-587c585ba617304c841f294742ab9d459da608a0.tar.gz | |
Don't unmount the sd card as aggressively
Diffstat (limited to 'src')
| -rw-r--r-- | src/system_fsm/running.cpp | 7 |
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(); } |
