1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

Merge pull request #3195 from mikeller/fix_beeper_led

Changed beeper warning LED to only activate when no other warnings are shown.
This commit is contained in:
Michael Keller 2017-06-03 12:57:27 +12:00 committed by GitHub
commit 6e4af36c9c

View file

@ -546,10 +546,6 @@ static void applyLedWarningLayer(bool updateNow, timeUs_t *timer)
const hsvColor_t *warningColor = NULL;
if (isBeeperOn()) {
warningColor = &HSV(ORANGE);
}
if (warningFlags) {
bool colorOn = (warningFlashCounter % 2) == 0; // w_w_
warningFlags_e warningId = warningFlashCounter / 4;
@ -567,6 +563,10 @@ static void applyLedWarningLayer(bool updateNow, timeUs_t *timer)
default:;
}
}
} else {
if (isBeeperOn()) {
warningColor = &HSV(ORANGE);
}
}
if (warningColor) {