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

Correct single RGB & DRGB modes to explicitly utilize white #3507

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

mxklb
Copy link
Contributor

@mxklb mxklb commented Nov 8, 2023

Using availDMXLen to choose to utilize white channel is messy because it has nothing to do with ability of the strip. It is the number of channels available in the E1.31/Artnet package. Additional this may lead to unexpected behavior if subsequent DMX start addresses for multiple WLED controllers shall be used.

The approach here is clear, if no white channel exist:

  • Single RGB -> 3 DMX channels
  • Single DRGB -> 4 DMX channels

And if white channel exists:

  • Single RGB(W) -> 4 DMX channels
  • Single DRGB(W) -> 5 DMX channels

So number of DMX channels for both modes is +1 if LEDs have white, else number of channels is as documented.

Note: Should be changed in documentation as well, shall be named Single RGB(W) and Single DRGB(W)

@mxklb mxklb marked this pull request as draft November 8, 2023 23:32
@mxklb mxklb marked this pull request as ready for review November 8, 2023 23:54
@blazoncek
Copy link
Collaborator

Please re-base this PR to 0_15 branch.

@softhack007 softhack007 added this to the 0.15.0 candidate milestone Nov 11, 2023
Copy link
Collaborator

@blazoncek blazoncek left a comment

Choose a reason for hiding this comment

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

I do not use realtime data so cannot test this PR.
Still, as WLED allows realtime data to be displayed on main segment only, and main segment may not include white channel, it is mandatory to differentiate if the underlying canvas supports white properly.

Segment has light capabilities embedded (and recalculated on each change) and white channel presence can be determined by Segment::hasWhite() method.

wled00/e131.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@blazoncek blazoncek left a comment

Choose a reason for hiding this comment

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

Seems ok but please add parentheses. 😄

wled00/e131.cpp Outdated Show resolved Hide resolved
wled00/e131.cpp Outdated Show resolved Hide resolved
@mxklb mxklb changed the base branch from main to 0_15 November 17, 2023 13:35
@mxklb
Copy link
Contributor Author

mxklb commented Nov 17, 2023

@blazoncek please check bdd667d

I think it could be faster when only iterating over differentiated length as well, shall I add these checks again?

@blazoncek
Copy link
Collaborator

IDK. I have very little knowledge about realtime apart from DDP implementation.
If you can, do some testing and make appropriate changes if necessary. When you think it is ok just say so and I'll merge.

@mxklb mxklb marked this pull request as draft November 18, 2023 14:27
@mxklb
Copy link
Contributor Author

mxklb commented Nov 18, 2023

I'll change back PR draft mode, when I've tested code changes with realtime DMX console e131 input.

@softhack007
Copy link
Collaborator

softhack007 commented Jun 25, 2024

I'll change back PR draft mode, when I've tested code changes with realtime DMX console e131 input.

@mxklb did you make progress? This PR is in draft for 8 months now, are you still working on it?

mxklb force-pushed the e131-single branch from 0360497 to bdd667 7 months ago

PS: please don't force-push - it leads to many strange effects on github, including lost review comments.

@softhack007 softhack007 added the stale This issue will be closed soon because of prolonged inactivity label Jun 25, 2024
@mxklb
Copy link
Contributor Author

mxklb commented Jul 2, 2024

I forgot to test it. Implementaion looks still good, is an improvement.

I'll try to test it the following week, and will change draft mode, when everything works as expected.

@softhack007 softhack007 added enhancement Awaiting testing and removed stale This issue will be closed soon because of prolonged inactivity labels Sep 29, 2024
@netmindz netmindz changed the base branch from 0_15 to main December 20, 2024 14:09
@netmindz netmindz removed this from the 0.15.1 candidate milestone Jan 10, 2025
@netmindz netmindz added this to the 0.16.0 candidate milestone Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants