Fix & simplify fatal screens

This commit is contained in:
Raphael Coeffic
2022-06-17 05:34:47 +02:00
committed by Raphael Coeffic
parent 6798b2fde9
commit ac84ac1397
4 changed files with 65 additions and 151 deletions
-12
View File
@@ -476,7 +476,6 @@ void guiMain(event_t evt)
void perMain()
{
DEBUG_TIMER_START(debugTimerPerMain1);
static bool fatalError = false;
checkSpeakerVolume();
@@ -509,7 +508,6 @@ void perMain()
#if defined(RTC_BACKUP_RAM)
if (globalData.unexpectedShutdown) {
fatalError = true;
drawFatalErrorScreen(STR_EMERGENCY_MODE);
return;
}
@@ -527,22 +525,12 @@ void perMain()
// TODO: implement for b/w
#if defined(COLORLCD)
fatalError = true;
drawFatalErrorScreen(STR_NO_SDCARD);
return;
#endif
}
#endif
#if defined(LIBOPENUI)
if(fatalError)
{
clearFatalErrorScreen();
fatalError = false;
}
#endif
if (usbPlugged() && getSelectedUsbMode() == USB_MASS_STORAGE_MODE) {
#if defined(LIBOPENUI)
// draw some image showing USB