Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Bugfix: correcting bitshift order to match ws2811 spec #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/esp32WS2811.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ void WS2811::_handleRmt(WS2811* ws2811) {
currentItem = &rmtItems[0];
if (xSemaphoreTake(ws2811->_smphr, 100) == pdTRUE) {
for (size_t i = 0; i < ws2811->_numLeds; ++i) {
uint32_t currentPixel = ws2811->_leds[i].green << 16 |
ws2811->_leds[i].red << 8 |
uint32_t currentPixel = ws2811->_leds[i].red << 16 |
ws2811->_leds[i].green << 8 |
ws2811->_leds[i].blue;
for (int8_t j = 23; j >= 0; --j) {
// We have 24 bits of data representing the red, green and blue channels. The value of the
Expand Down