fix(color): unable to turn off radio if powered on with no SD card (#5893)
This commit is contained in:
@@ -1370,6 +1370,15 @@ void edgeTxInit()
|
|||||||
{
|
{
|
||||||
TRACE("edgeTxInit");
|
TRACE("edgeTxInit");
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
// Show splash screen (color LCD)
|
// Show splash screen (color LCD)
|
||||||
if (!(startOptions & OPENTX_START_NO_SPLASH))
|
if (!(startOptions & OPENTX_START_NO_SPLASH))
|
||||||
startSplash();
|
startSplash();
|
||||||
@@ -1623,15 +1632,6 @@ int main()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#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
|
|
||||||
|
|
||||||
tasksStart();
|
tasksStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -275,6 +275,13 @@ void runFatalErrorScreen(const char* message)
|
|||||||
{
|
{
|
||||||
lcdInitDisplayDriver();
|
lcdInitDisplayDriver();
|
||||||
|
|
||||||
|
drawFatalErrorScreen(message);
|
||||||
|
|
||||||
|
// On startup wait for power button to be released
|
||||||
|
while (pwrPressed()) {
|
||||||
|
WDG_RESET();
|
||||||
|
}
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
drawFatalErrorScreen(message);
|
drawFatalErrorScreen(message);
|
||||||
WDG_RESET();
|
WDG_RESET();
|
||||||
|
|||||||
Reference in New Issue
Block a user