esp32WS2811 icon indicating copy to clipboard operation
esp32WS2811 copied to clipboard

Bugfix: correcting bitshift order to match ws2811 spec

Open phleech opened this issue 2 years ago • 0 comments

Whilst testing this library against a string of 50 WS2811 LED's I noticed that Colour(r, g, b) seemed to be mixing up the red and green channels.

Upon investigation it appears that this is a result of the bit shifting being incorrect.

Excerpt from the WS2811 spec:

Composition of 24bit Data
R7 R6 R5 R4 R3 R2 R1 R0 G7 G6 G5 G4 G3 G2 G1 G0 B7 B6 B5 B4 B3 B2 B1 B0

This is a breaking change. It now works correctly for my string of LED's but could potentially break for others (especially if they've added work arounds in their code for the issue).

phleech avatar Oct 16 '23 23:10 phleech