1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +03:00

fixed warning blink with better visualisation

used a second black color for better blink effect
This commit is contained in:
TheAngularity 2016-07-20 15:42:40 +02:00 committed by GitHub
parent f61ec9af0a
commit 8ecd5e10c8

View file

@ -687,17 +687,17 @@ static void applyLedWarningLayer(bool updateNow, uint32_t *timer)
}
if (warningFlags) {
const hsvColor_t *warningColor = NULL;
const hsvColor_t *warningColor = &HSV(BLACK);
bool colorOn = (warningFlashCounter % 2) == 0; // w_w_
warningFlags_e warningId = warningFlashCounter / 4;
if (warningFlags & (1 << warningId)) {
switch (warningId) {
case WARNING_ARMING_DISABLED:
warningColor = colorOn ? &HSV(GREEN) : NULL;
warningColor = colorOn ? &HSV(GREEN) : &HSV(BLACK);
break;
case WARNING_LOW_BATTERY:
warningColor = colorOn ? &HSV(RED) : NULL;
warningColor = colorOn ? &HSV(RED) : &HSV(BLACK);
break;
case WARNING_FAILSAFE:
warningColor = colorOn ? &HSV(YELLOW) : &HSV(BLUE);