MabezDev / ssd1351

A Driver crate for the SSD1351, which drives 128x128 colour displays
16 stars 14 forks source link

Very significant performance increase #17

Closed Orange-Murker closed 2 years ago

Orange-Murker commented 2 years ago

Before and After

https://user-images.githubusercontent.com/23561952/184943777-378b1cea-0207-43e7-a2bf-5863bff243d6.mp4

https://user-images.githubusercontent.com/23561952/184943790-26859cb5-2524-486e-b963-7b952702e69e.mp4

Orange-Murker commented 2 years ago

I believe that you had a typo in display.rs where the address increment mode was set to horizontal instead of vertical for the 90 degree rotation. Before I noticed it today, it puzzled me why the addressing was so weird where I had to transpose all the pixels only for that specific rotation. In my latest commit I have changed the address increment mode to vertical (which makes sense as the display is in a vertical orientation as well) and removed all the unnecessary code that I used to address that (pun intended).

MabezDev commented 2 years ago

Thanks for the improvement and the bugfix! LGTM!