From 4a6ba1e808f02c285323447f620ca296c59ae2f2 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 6 Sep 2024 08:46:29 +1000 Subject: [PATCH] Fix RGBW for WS2812 SPI driver (#24367) --- platforms/chibios/drivers/ws2812_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/chibios/drivers/ws2812_spi.c b/platforms/chibios/drivers/ws2812_spi.c index ad2e87781c4f..9896f9e69d8e 100644 --- a/platforms/chibios/drivers/ws2812_spi.c +++ b/platforms/chibios/drivers/ws2812_spi.c @@ -133,7 +133,7 @@ static void set_led_color_rgb(rgb_led_t color, int pos) { #endif #ifdef WS2812_RGBW for (int j = 0; j < 4; j++) - tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 4 + j] = get_protocol_eq(color.w, j); + tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 3 + j] = get_protocol_eq(color.w, j); #endif }