Skip to content
This repository has been 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

Conversation

phleech
Copy link

@phleech phleech commented Oct 16, 2023

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.

None yet

1 participant