Commit 529b4e3
authored
* When rotated 90/270 degrees led's aren't set appropraitely
When a `Grid.rotate()` is called with 1 or 3, the correct quadrant isn't
chosen.
The issue lies in the function `dev_monome_quad_idx`. This doesn't take
into account rotation state, thus when called with something like:
```c
dev_monome_quad_idx(md->m, 2, 12)
```
It returns quadrant 2. I think we technically want quadrant 1.
We can read the rotation state from the monome device, and use that to
correctly calculate the quadrant with a slightly different formula that
both works for 128 and 256 grids.
* Fix missing variable
* We need to pass in the md reference
* Possible fix for rows/cols not being reset after a rotation
* Don't query grid for rotation status
* Use Grid.update_devices
* Respond to tehn's comments
* Linter
1 parent fc76920 commit 529b4e3
2 files changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
91 | 94 | | |
92 | 95 | | |
93 | | - | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
| |||
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
130 | | - | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
| |||
0 commit comments