diff --git a/src/main/drivers/light_ws2811strip.c b/src/main/drivers/light_ws2811strip.c index fc2c43db79..2533eb8791 100644 --- a/src/main/drivers/light_ws2811strip.c +++ b/src/main/drivers/light_ws2811strip.c @@ -45,6 +45,7 @@ static volatile uint8_t ws2811LedDataTransferInProgress = 0; static rgbColor24bpp_t ledColorBuffer[LED_STRIP_LENGTH]; const rgbColor24bpp_t black = { {0, 0, 0} }; +const rgbColor24bpp_t orange = { {255, 128, 0} }; const rgbColor24bpp_t white = { {255, 255, 255} }; void setLedColor(uint16_t index, const rgbColor24bpp_t *color) diff --git a/src/main/drivers/light_ws2811strip.h b/src/main/drivers/light_ws2811strip.h index a5512fad8a..e5bbd09330 100644 --- a/src/main/drivers/light_ws2811strip.h +++ b/src/main/drivers/light_ws2811strip.h @@ -46,3 +46,4 @@ void setStripColors(const rgbColor24bpp_t *colors); extern const rgbColor24bpp_t black; extern const rgbColor24bpp_t white; +extern const rgbColor24bpp_t orange; diff --git a/src/main/mw.c b/src/main/mw.c index d08626170a..5d9760e554 100755 --- a/src/main/mw.c +++ b/src/main/mw.c @@ -394,7 +394,10 @@ void updateLedStrip(void) static uint8_t stripState = 0; + const rgbColor24bpp_t *flashColor; + if (stripState == 0) { + flashColor = &orange; if (f.ARMED) { setStripColors(stripOrientation); } else { @@ -402,12 +405,30 @@ void updateLedStrip(void) } stripState = 1; } else { + flashColor = &black; if (feature(FEATURE_VBAT) && shouldSoundBatteryAlarm()) { setStripColor(&black); } stripState = 0; } + if (rcCommand[ROLL] < -100) { + setLedColor(0, flashColor); + setLedColor(9, flashColor); + } + if (rcCommand[ROLL] > 100) { + setLedColor(4, flashColor); + setLedColor(5, flashColor); + } + if (rcCommand[PITCH] > 100) { + setLedColor(0, flashColor); + setLedColor(4, flashColor); + } + if (rcCommand[PITCH] < -100) { + setLedColor(5, flashColor); + setLedColor(9, flashColor); + } + ws2811UpdateStrip(); }