Closed bugadani closed 3 years ago
This fixes the clear issue, but the terminal_i2c
demo crashes if I add .with_rotation(DisplayRotation::Rotate90)
or .with_rotation(DisplayRotation::Rotate270)
to it with this odd result:
I haven't had time to investigate but it would be great to fix this new crash in this PR as well, even if the characters remain garbled.
Thanks I forgot to fill my screen to see if there's anything more fishy. Current code writes in the correct direction but newline handling is still incorrect and characters are rotated.
I've fixed the whole thing instead. Code quality could use some love, but hey, priorities :)
Closes #85
@therealprof you were the original author of
TerminalMode
so I'll let you approve and merge this PR if you're happy with it.
I was afraid you would say that. 😅
reset_pos still needs to be checked, and the docs updated, so take your time :)
Once CI is happy, this is ready for review
Awesome. I'll do a release later this evening. Thanks for your patience all!
Hi! Thank you for helping out with SSD1306 development! Please:
master
if you're not already up to dateCHANGELOG.md
entry in the Unreleased section under the appropriate heading (Added, Fixed, Changed, etc)rustfmt
on the project withcargo fmt --all
- CI will not pass without this stepPR description
~I had a go with #85 and failed miserably. But while doing so, I discovered the driver crashes with 90° rotation. This PR fixes that crash, but does nothing to fix the rotation issue.~
The issue is, properties.get_dimension flips width and height but set_draw_area expects them in the original order. I think for clearing it doesn't matter which direction we go, so I'm using the original physical size instead.
This is a performance hit, because every cursor move sends several display commands, but all the rotation values are rendered correctly.