diff --git a/radio/src/gui/128x64/popups.cpp b/radio/src/gui/128x64/popups.cpp index 69de13404..264330d2b 100644 --- a/radio/src/gui/128x64/popups.cpp +++ b/radio/src/gui/128x64/popups.cpp @@ -92,6 +92,8 @@ void showAlertBox(const pm_char * title, const pm_char * text, const char * acti lcdRefresh(); lcdSetContrast(); clearKeyEvents(); + backlightOn(); + checkBacklight(); } void runPopupWarning(event_t event) diff --git a/radio/src/gui/212x64/popups.cpp b/radio/src/gui/212x64/popups.cpp index a6c83bfe4..40d73451c 100644 --- a/radio/src/gui/212x64/popups.cpp +++ b/radio/src/gui/212x64/popups.cpp @@ -83,6 +83,8 @@ void showAlertBox(const char * title, const char * text, const char * action, ui lcdRefresh(); lcdSetContrast(); clearKeyEvents(); + backlightOn(); + checkBacklight(); } void runPopupWarning(event_t event) diff --git a/radio/src/gui/480x272/popups.cpp b/radio/src/gui/480x272/popups.cpp index f627ae0ef..d26ccff61 100644 --- a/radio/src/gui/480x272/popups.cpp +++ b/radio/src/gui/480x272/popups.cpp @@ -65,6 +65,8 @@ void showAlertBox(const char * title, const char * text, const char * action, ui lcdRefresh(); lcdSetContrast(); clearKeyEvents(); + backlightOn(); + checkBacklight(); } void showMessageBox(const char * title) diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index db4004a24..def103f0d 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -2814,25 +2814,10 @@ uint32_t pwrCheck() } if (get_tmr10ms() - pwr_press_time > PWR_PRESS_SHUTDOWN_DELAY) { #if defined(SHUTDOWN_CONFIRMATION) - while (1) { - lcdRefreshWait(); - lcdClear(); - POPUP_CONFIRMATION("Confirm Shutdown"); - event_t evt = getEvent(false); - DISPLAY_WARNING(evt); - lcdRefresh(); - if (warningResult == true) { - pwr_check_state = PWR_CHECK_OFF; - return e_power_off; - } - else if (!warningText) { - // shutdown has been cancelled - pwr_check_state = PWR_CHECK_PAUSED; - return e_power_on; - } - } + while (1) #else while ((TELEMETRY_STREAMING() && !g_eeGeneral.disableRssiPoweroffAlarm)) { +#endif lcdRefreshWait(); lcdClear(); POPUP_CONFIRMATION("Confirm Shutdown"); @@ -2852,7 +2837,6 @@ uint32_t pwrCheck() haptic.play(15, 3, PLAY_NOW); pwr_check_state = PWR_CHECK_OFF; return e_power_off; -#endif } else { drawShutdownAnimation(pwrPressedDuration(), message); @@ -2890,9 +2874,8 @@ uint32_t pwrCheck() if (TELEMETRY_STREAMING()) { RAISE_ALERT(STR_MODEL, STR_MODEL_STILL_POWERED, STR_PRESS_ENTER_TO_CONFIRM, AU_MODEL_STILL_POWERED); while (TELEMETRY_STREAMING()) { -#if defined(CPUARM) + resetForcePowerOffRequest(); CoTickDelay(10); -#endif if (pwrPressed()) { return e_power_on; } diff --git a/radio/src/tasks_arm.cpp b/radio/src/tasks_arm.cpp index eed69616a..4756a23ab 100644 --- a/radio/src/tasks_arm.cpp +++ b/radio/src/tasks_arm.cpp @@ -88,11 +88,6 @@ uint16_t stackAvailable() volatile uint16_t timeForcePowerOffPressed = 0; -void resetForcePowerOffRequest() -{ - timeForcePowerOffPressed = 0; -} - bool isForcePowerOffRequested() { if (pwrOffPressed()) { diff --git a/radio/src/tasks_arm.h b/radio/src/tasks_arm.h index b34aad065..abd0e66d7 100644 --- a/radio/src/tasks_arm.h +++ b/radio/src/tasks_arm.h @@ -73,4 +73,7 @@ extern TaskStack audioStack; void tasksStart(); +extern volatile uint16_t timeForcePowerOffPressed; +inline void resetForcePowerOffRequest() {timeForcePowerOffPressed = 0; } + #endif // _TASKS_ARM_H_