st7789py.py: WIDTH_320 Rotation Table Values Reversed
Closed this issue · 1 comments
Apologies if this is done improperly, I am very new to GitHub.
In lib/st7789py.py, it looks like the values for the rotation table WIDTH_320 are reversed (240 should be 320 and vice versa). I was encountering errors with my 320x240 display not showing the full screen beyond 240x240, until I swapped all the values. The swapped values also better reflects the pattern from WIDTH_135.
I've attached images to show the issue:
Old Rotation Table WIDTH_320 is:
WIDTH_320 = [(320, 240, 0, 0),
(240, 320, 0, 0),
(320, 240, 0, 0),
(240, 320, 0, 0)]
Fixed Rotation Table WIDTH_320 is:
WIDTH_320 = [(240, 320, 0, 0),
(320, 240, 0, 0),
(240, 320, 0, 0),
(320, 240, 0, 0)]
Thanks for the code otherwise - this is my first time controlling a display with a microcontroller, and I wouldn't have been able to do it without this code!
You are correct; I had the widths and heights reversed in the WIDTH_320 table. Thanks for the report.