From 158747a26f42d67b56d685acedc8d05404dbd2f0 Mon Sep 17 00:00:00 2001 From: Che177 <7478379+Che177@users.noreply.github.com> Date: Sat, 25 Nov 2023 16:42:52 -0800 Subject: [PATCH] Update bus_wrapper.h SK6812 RGB + WW fix: - set color order to RGB - swap B and W for correct color Based on: https://github.com/Aircoookie/WLED/issues/2646 --- wled00/bus_wrapper.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/wled00/bus_wrapper.h b/wled00/bus_wrapper.h index 72b4435e5b..c5d80fb219 100644 --- a/wled00/bus_wrapper.h +++ b/wled00/bus_wrapper.h @@ -693,10 +693,12 @@ class PolyBus { } static void setPixelColor(void* busPtr, uint8_t busType, uint16_t pix, uint32_t c, uint8_t co) { - uint8_t r = c >> 16; - uint8_t g = c >> 8; - uint8_t b = c >> 0; - uint8_t w = c >> 24; +/// Color order RGB + B-W swapped correctly + uint8_t g = c >> 16; + uint8_t b = c >> 8; + uint8_t w = c >> 0; + uint8_t r = c >> 24; +/// RgbwColor col; // reorder channels to selected order @@ -1217,4 +1219,4 @@ class PolyBus { } }; -#endif \ No newline at end of file +#endif