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

Need segments with arbitrary LED numbers. #1530

Closed
booroondook-eng opened this issue Dec 19, 2020 · 3 comments
Closed

Need segments with arbitrary LED numbers. #1530

booroondook-eng opened this issue Dec 19, 2020 · 3 comments

Comments

@booroondook-eng
Copy link

It is need to have segments with arbitrary LED numbers, not consecutive numbers only.
Sometimes the physical placement of the LEDs cannot be match their placement on the cable.
Suppose we have a curtain with attached LEDs.
We want to make the segments as horizontal rows.
Segment #0 should include LEDs 0, 1, 12-15, 26-29, 40 and 41.
Segment #1 should include LEDs 2-4, 9-11, 16-18, 23-25, 30-32 and 37-39.
Segment #2 should include LEDs 5-8, 19-22 and 33-36.
The current settings do not allow including arbitrary LED numbers in the segments, but only allow sequences of strictly following numbers.
curtain

@Aircoookie
Copy link
Member

Hi!
This is a really good enhancement - however I'm not yet sure how it could be added. This goes more into a direction of a custom mapping (that would allow you to define the top "segment" as LEDs 0-12, even though it is 0, 1, 12-15, 26-29, 40, 41 in hardware).
Segments themselves will likely stay the way they are - as a continuous area of LEDs (unless I get a really good idea!)
Otherwise you would also get the problem that you don't know in what order the segment should be addressed (0, 13, 14, 27, 28, 41, 1, 12, 15, 26, 29, 40), so horizontal lines or maybe rather (14, 13, 0, 1, 12, 15, 26, 29, 40, 41, 28, 27), wrapping around from the middle.
In case you would like to use this custom mapping, there is an array in FX_fcn.cpp where you can map a virtual LED (how it is addressed in WLED effects and segments) to a physical LED :)

@booroondook-eng
Copy link
Author

I think it is possible to create a table with the correspondence between the physical and logical LED numbers. And then in all other settings, operate only with logical numbers.
Also, this table should have a "Reset" button, when pressed, all logical numbers become equal to physical ones.

@blazoncek
Copy link
Collaborator

WLED 0.14+ supports matrices where OP request can be done by simply using segments.
If you need 1D representation then you can use ledmaps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants