Hi! Thank you for helping out with SSD1306 development! Please:
[ ] Check that you've added documentation to any new methods
[ ] Rebase from master if you're not already up to date
[ ] Add or modify an example if there are changes to the public API
[ ] Add a CHANGELOG.md entry in the Unreleased section under the appropriate heading (Added, Fixed, Changed, etc)
[ ] Run rustfmt on the project with cargo fmt --all - CI will not pass without this step
[ ] Check that your branch is up to date with master and that CI is passing once the PR is opened
PR description
All display sizes, except for the 96x16 are centered, meaning OFFSETX is same for both 0 and 180 rotations. The 96x16 is an exception to this, where it's OFFSETX is 0.
This PR changes flush() so it doesn't assume a symmetrical display. I also added the option to specify different driver sizes, but I'm pretty sure the only reason for that in this driver is to avoid a magic number (128) in the code.
Also 72x40 rotation was broken due to swapped X/Y offsets.
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
All display sizes, except for the 96x16 are centered, meaning OFFSETX is same for both 0 and 180 rotations. The 96x16 is an exception to this, where it's OFFSETX is 0.
This PR changes
flush()
so it doesn't assume a symmetrical display. I also added the option to specify different driver sizes, but I'm pretty sure the only reason for that in this driver is to avoid a magic number (128) in the code.Also 72x40 rotation was broken due to swapped X/Y offsets.
Tested on 128x32, 72x40 and 96x16 displays.
Closes #138