fix(radio): prevent dedicated RGB LEDs flickering (#6045)

This commit is contained in:
3djc
2025-04-04 12:44:53 +10:00
committed by GitHub
parent 51b38dd4c6
commit 07ea98db4a
6 changed files with 21 additions and 14 deletions
+3 -3
View File
@@ -25,7 +25,7 @@
#include "boards/generic_stm32/rgb_leds.h"
#include "board.h"
#if defined(LED_STRIP_GPIO)
#include "boards/generic_stm32/rgb_leds.h"
#include "stm32_ws2812.h"
#endif
#define GET_RED(color) (((color) & 0xFF0000) >>16)
@@ -65,8 +65,8 @@ uint8_t ledMapping[] = {0, 1, 2, 3, 4, 5, 6};
void fsLedRGB(uint8_t index, uint32_t color)
{
rgbSetLedColor(ledMapping[index], GET_RED(color), \
GET_GREEN(color),GET_BLUE(color));
ws2812_set_color(ledMapping[index], GET_RED(color), GET_GREEN(color),
GET_BLUE(color));
}
uint8_t getRGBColorIndex(uint32_t color)