Fix backlight issue when storage is erased

and crash on PWR button press while a full-screen dialog is displayed.
This commit is contained in:
Raphael Coeffic
2021-05-26 16:08:12 +02:00
parent 945fc9510a
commit 038b8364f6
2 changed files with 11 additions and 2 deletions
+3 -1
View File
@@ -162,7 +162,8 @@ void FullScreenDialog::runForever()
#endif
}
else if (check == e_power_press) {
RTOS_WAIT_MS(20);
WDG_RESET();
RTOS_WAIT_MS(1);
continue;
}
@@ -193,6 +194,7 @@ void FullScreenDialog::runForeverNoPwrCheck()
void raiseAlert(const char * title, const char * msg, const char * action, uint8_t sound)
{
TRACE("raiseAlert('%s')", msg);
AUDIO_ERROR_MESSAGE(sound);
auto dialog = new FullScreenDialog(WARNING_TYPE_ALERT, title ? title : "",
msg ? msg : "", action ? action : "");