-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for RGBW LEDs like SK6812RGBW #143
base: master
Are you sure you want to change the base?
Conversation
@@ -261,6 +264,9 @@ void process_command(byte argc, byte *argv){ | |||
case PIXEL_COLOUR_BRG: | |||
setColorOrderBRG(); | |||
break; | |||
case PIXEL_COLOUR_RGBW: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajfisher I have made some protections within pixel.js to make sure that by default, we send an array with length of 3. We send 4 if rgbw colors are declared at instantiation. I'm going to work on adding similar protection here I think, to make sure all is good within the firmware.I wanted your feedback on this approach so far before I get too into it. Please let me know your thoughts on what I have in the PR to this point. I will also go back and make sure all tests pass within the next few days. Thanks!
firmware/build/backpack/ws2812.cpp
Outdated
@@ -261,6 +281,11 @@ void process_command(byte argc, byte *argv){ | |||
case PIXEL_COLOUR_BRG: | |||
setColorOrderBRG(); | |||
break; | |||
case PIXEL_COLOUR_RGBW: | |||
isRGBW = true; | |||
color_depth = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajfisher I'm trying to make the value color_depth
changable on the fly from 3 to 4. This doesn't seem to be working for me. Can you give me some guidance as to where I can change this value when switching to RGBW?
This PR will allow for creating any color using RGBW pixels and strips.
TODO:
This is a WIP and I'm placing this PR mostly to communicate what was missing from a previous attempt at this work to get all colors working as expected and to save state of the work.