Skip to content

Commit

Permalink
Update bus_wrapper.h
Browse files Browse the repository at this point in the history
SK6812 RGB + WW fix:
- set color order to RGB
- swap B and W for correct color

Based on: wled#2646
  • Loading branch information
Che177 authored Nov 26, 2023
1 parent a2f5965 commit 158747a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions wled00/bus_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1217,4 +1219,4 @@ class PolyBus {
}
};

#endif
#endif

0 comments on commit 158747a

Please sign in to comment.