Grid LEDs do not illuminate in vertical orientation
brokyo opened this issue · 2 comments
I'm working on a script using an 8x16 grid from the most recent batch on norns 2.8.1/norns 231114 and I'm unable to light all the keys when it's in a vertical orientation. Even with the simplest approach, I can only get the top 8x8 section to illuminate.
A really small script that expresses this problem:
g = grid.connect()
g:rotation(1)
g:all(5)
g:refresh()
I don't believe this to be a mechanical issue because the opposite 8x8 set lights up if I rotate 270 degrees. Similarly, if the rotation is 0 or 180 everything lights up.
When I log key presses after g:rotation(1)
with function g.key(x,y,z)
I get messages with appropriate x and y coordinates so this seems to be limited to illumination.
Additionally, I saw this post on lines which makes me suspect this is an issue that isn't just affecting me.
hello! hope all's well :) was just about to post about this, thank you for the ticket!
i think this is because 8x16 grids only have two quads allocated:
norns/matron/src/device/device_monome.c
Line 59 in 28bb75c
...which doesn't account for rotation! so when we're setting LEDs with a 90 degree rotation, we're targeting quads 1 and 3, but 8x16's don't initiate past quad 2!
my C isn't the best, but @ryleelyman also ran into this with seamstress (and fixed by instantiating 4 quads for 128's: https://github.com/ryleelyman/seamstress/pull/113/files) -- @tehn , does this all sound right?
please see my comment on the linked PR