Add a "No SD card" screen on boot (#1451)
This prevents certain issues related to SD card being now mandatory to run EdgeTx.
This commit is contained in:
+11
-4
@@ -1824,6 +1824,13 @@ void opentxInit()
|
||||
if (!sdMounted())
|
||||
sdInit();
|
||||
|
||||
#if !defined(COLORLCD)
|
||||
if (!sdMounted()) {
|
||||
g_eeGeneral.pwrOffSpeed = 2;
|
||||
runFatalErrorScreen(STR_NO_SDCARD);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(AUTOUPDATE)
|
||||
sportStopSendByteLoop();
|
||||
if (f_stat(AUTOUPDATE_FILENAME, nullptr) == FR_OK) {
|
||||
@@ -2005,12 +2012,12 @@ int main()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(EEPROM)
|
||||
if (!SD_CARD_PRESENT() && !UNEXPECTED_SHUTDOWN()) {
|
||||
// TODO: b/w SD card fatal screen
|
||||
#if defined(COLORLCD)
|
||||
// SD_CARD_PRESENT() does not work properly on most
|
||||
// B&W targets, so that we need to delay the detection
|
||||
// until the SD card is mounted (requires RTOS scheduler running)
|
||||
if (!SD_CARD_PRESENT() && !UNEXPECTED_SHUTDOWN()) {
|
||||
runFatalErrorScreen(STR_NO_SDCARD);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user