Xylopyrographer / STAC

A Roland Smart Tally Atom Client
Other
3 stars 0 forks source link

Set Display Orientation #11

Closed Xylopyrographer closed 3 years ago

Xylopyrographer commented 3 years ago

Add the ability to set the display orientation? One of four possible "up" positions.

Ref: https://patriot-geek.blogspot.com/2020/05/atom-matrix-using-mpu6886-accelerometer.html

mqshaw commented 3 years ago

Yes, I have been playing with that myself this weekend. I have proto code that displays an arrow depending on the orientation of the device - great article referenced above. Rather than changing the output to be displayed, i am thinking of using an orientation function that rotates the core Glyph data, such that the rest of the code is agnostic to the change.

Xylopyrographer commented 3 years ago

Yup. The way to do it would be to rotate the matrix defining the glyphs before displaying them.

To facilitate that, I was wondering about adding a byte to the glyph definitions that would indicate whether the glyph was symmetrical about the four axis or not. I.e.; no need to rotate the tally status displays or the "X".

mqshaw commented 3 years ago

I will proto this up. I think that we can do a simple check and only rotate the glyphs when a change occurs. That way it minimizes the rotation overhead. See pull request https://github.com/Xylopyrographer/STAC/pull/28