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
phleech wants to merge 1 commit into
bertmelis:masterfrom
phleech:master
Open

Bugfix: correcting bitshift order to match ws2811 spec#6
phleech wants to merge 1 commit into
bertmelis:masterfrom
phleech:master

Conversation

@phleech

@phleech phleech commented Oct 16, 2023

Copy link
Copy Markdown

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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant