-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Feature remap mapper #1478
base: master
Are you sure you want to change the base?
Feature remap mapper #1478
Conversation
Fixed panel ordering, panels are now counted from Raspberry (as in example above) |
Yes, that's how it should work. You need to map all panels (end of chain 3), so you must discard last 6 panels
|
thank you, yes I discarded the last panels, was a little sloppy and did not write it out :) 0,0 is in top left Corner but is it seen from the front or the back? You wrote ‘Remap:192,128’ should it not be 128 width and 192 height. Remap:<new_width>,<new_height>| Or should I flip it with ;Rotate after the mapping? My screen is built to have 0,0 in lower left corner seen from the back. So it is a little confusing to map it correctly, hence all the questions. |
Sorry, was answering too late in the evening yesterday. The mapping uses rgbmatrix coordinates - top-left corner is (0,0), x increasing to the right, y is increasing down, looking on leds (front side). Display coordinates are used in mapping, panel (and chain) is implicit - |<chain1, panel 1>|<chain1, panel2|...|<chain 2, panel 1>|... Size will be If I understand it correctly, first panel on chain 1 in your case in bottom right corner when looking on leds? In that case, first entry would be |
Again Thank You, yes I could definitely rearrange the modules. Will try it now, great idea! |
+1 |
Nice! This is the kind of universal mapper that I was looking forward for someone to implement! Sorry for the delay in the review, I was busy around November and might not have noticed the pull request. I still have to look at the details of the code, and will probably have time on Sunday for that. In the meantime: to be most useful to users, can you add a description in the mapper section of the README in examples-api-use/ ? |
@hzeller :
|
How is the working coming along with the documentation ? |
@hzeller Is it possible to use this in the python binding somehow? Even if it is only a hot-fix? |
(for discussion, needs some polishing, needs testing)
This PR implements universal mapper - each segment is mapped to arbitrary position and orientation on canvas
My use case is two separate displays connected as chains, each with different geometry. But it shall handle almost all possible panel configuration
Syntax is:
new_width, new_height - size of created canvas. It can be both larger and smaller than old canvas.
panel0_x, panel0_y - upper-left corner of remapped panel
panel0_orientation -
n
,s
,e
,w
for panel orientation,x
to discard panelExactly one entry must be specified for each LED panel (chain * parallel entries).
Mapping may be partially outside new canvas (maybe useful for something?)
Unused positions must be discarded (
0,0x
) - useful if chains are of different lengthIt is possible let some canvas space unused (no panel mapped to it). Writes to this area will be ignored.
For example:
First chain is 5 panels in line, top of the panel is pointing right, 40x16 pixels
Second chain is 2x2 square, panels pointing up, 32x16 pixels, top-left is 0,16 in canvas
Last panel on second chain is not used
I'll add some documentation if there is interest in this feature