From effe6850e034ab23fec69e90aa80bbdba5329614 Mon Sep 17 00:00:00 2001 From: philmoz Date: Sat, 4 Nov 2023 16:23:24 +1100 Subject: [PATCH] fix(radio): Don't update YAML files on SD card if radio in emergency mode (#4264) --- radio/src/storage/sdcard_common.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/radio/src/storage/sdcard_common.cpp b/radio/src/storage/sdcard_common.cpp index a23fca2912c..55dd774c1e3 100644 --- a/radio/src/storage/sdcard_common.cpp +++ b/radio/src/storage/sdcard_common.cpp @@ -71,6 +71,9 @@ void storageFormat() void storageCheck(bool immediately) { + // Don't write anything to SD card if in EM + if (globalData.unexpectedShutdown) return; + if (storageDirtyMsk & EE_GENERAL) { TRACE("eeprom write general"); storageDirtyMsk &= ~EE_GENERAL;