Skip to content
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

[wled] Fix White LED turns on to max brightness for any RGB changes #10252

Merged
merged 1 commit into from Mar 13, 2021
Merged

[wled] Fix White LED turns on to max brightness for any RGB changes #10252

merged 1 commit into from Mar 13, 2021

Conversation

DerFetzer
Copy link
Contributor

When you are using WLED with an RGBW strip every time you set a color the white channel is set to maximum brightness.
The source of the problem is the conversion from HSB to RGB that sets the MSB of the resulting int to 0xFF. This is then interpreted as white channel value by WLED.

This PR fixes this problem by zeroing the MSB.

Signed-off-by: Matthias Fetzer <kontakt@der-fetzer.de>
Copy link
Contributor

@Skinah Skinah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Can only test with RGB strings here and it works fine so thanks for checking it out with RGBW strings.

Is it possible for you to fix the DCO signoff before the 2nd person comes to do a review? It may be ok since it is a minor change and only 1 line.

@Skinah Skinah added the bug An unexpected problem or unintended behavior of an add-on label Mar 12, 2021
@Skinah Skinah changed the title [WLED] Zero out MSB as it will be treated as white [wled] Fix: White LED turns on to max brightness for any RGB changes. Mar 12, 2021
Copy link
Member

@fwolter fwolter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! LGTM, applying the small patch exception.

You need to sign-off your commits. See https://www.openhab.org/docs/developer/contributing.html#sign-your-work The necessary commands are listed when you click on "Details" at the DCO check below.

@fwolter fwolter merged commit 6b85894 into openhab:main Mar 13, 2021
@fwolter fwolter added this to the 3.1 milestone Mar 13, 2021
@fwolter
Copy link
Member

fwolter commented Mar 13, 2021

Just saw that you signed the commit correctly. The check complained because you used a different name in your Git settings.

arjanmels pushed a commit to arjanmels/openhab2-addons that referenced this pull request Mar 14, 2021
Signed-off-by: Matthias Fetzer <kontakt@der-fetzer.de>
themillhousegroup pushed a commit to themillhousegroup/openhab2-addons that referenced this pull request May 10, 2021
Signed-off-by: Matthias Fetzer <kontakt@der-fetzer.de>
Signed-off-by: John Marshall <john.marshall.au@gmail.com>
@wborn wborn changed the title [wled] Fix: White LED turns on to max brightness for any RGB changes. [wled] Fix White LED turns on to max brightness for any RGB changes Jun 22, 2021
computergeek1507 pushed a commit to computergeek1507/openhab-addons that referenced this pull request Jul 13, 2021
Signed-off-by: Matthias Fetzer <kontakt@der-fetzer.de>
thinkingstone pushed a commit to thinkingstone/openhab-addons that referenced this pull request Nov 7, 2021
Signed-off-by: Matthias Fetzer <kontakt@der-fetzer.de>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
Signed-off-by: Matthias Fetzer <kontakt@der-fetzer.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants