1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 17:25:20 +03:00

Added orange indication when beeper active to 'Warning' beeper mode.

This commit is contained in:
Michael Keller 2017-05-24 13:01:35 +12:00
parent f4e4e45aa2
commit 7f348b997e

View file

@ -531,9 +531,13 @@ static void applyLedWarningLayer(bool updateNow, timeUs_t *timer)
*timer += HZ_TO_US(10);
}
if (warningFlags) {
const hsvColor_t *warningColor = NULL;
const hsvColor_t *warningColor = NULL;
if (isBeeperOn()) {
warningColor = &HSV(ORANGE);
}
if (warningFlags) {
bool colorOn = (warningFlashCounter % 2) == 0; // w_w_
warningFlags_e warningId = warningFlashCounter / 4;
if (warningFlags & (1 << warningId)) {
@ -550,8 +554,10 @@ static void applyLedWarningLayer(bool updateNow, timeUs_t *timer)
default:;
}
}
if (warningColor)
applyLedHsv(LED_MOV_OVERLAY(LED_FLAG_OVERLAY(LED_OVERLAY_WARNING)), warningColor);
}
if (warningColor) {
applyLedHsv(LED_MOV_OVERLAY(LED_FLAG_OVERLAY(LED_OVERLAY_WARNING)), warningColor);
}
}