Show warning LED with switch and throttle alerts

Show warning LED for switch, throttle and ALERTS generally
i.e. MULTI failsafe not set, low RTC battery, storage warning
This commit is contained in:
Peter Feerick
2022-01-08 14:12:26 +10:00
committed by Peter Feerick
parent 88ade987a7
commit f8c01c3988
3 changed files with 10 additions and 4 deletions
+6 -4
View File
@@ -783,12 +783,14 @@ bool isThrottleWarningAlertNeeded()
void checkThrottleStick()
{
if (isThrottleWarningAlertNeeded()) {
LED_ERROR_BEGIN();
AUDIO_ERROR_MESSAGE(AU_THROTTLE_ALERT);
auto dialog = new FullScreenDialog(WARNING_TYPE_ALERT, TR_THROTTLE_UPPERCASE, STR_THROTTLE_NOT_IDLE, STR_PRESS_ANY_KEY_TO_SKIP);
dialog->setCloseCondition([]() {
return !isThrottleWarningAlertNeeded();
});
auto dialog =
new FullScreenDialog(WARNING_TYPE_ALERT, TR_THROTTLE_UPPERCASE,
STR_THROTTLE_NOT_IDLE, STR_PRESS_ANY_KEY_TO_SKIP);
dialog->setCloseCondition([]() { return !isThrottleWarningAlertNeeded(); });
dialog->runForever();
LED_ERROR_END();
}
}
#else