Closed mdroberts1243 closed 4 years ago
I've put an Adafruit_framebuf driver for the SH1107 128x64 OLED Featherwing: https://github.com/mdroberts1243/mdroberts1243_CircuitPython_SH1107_I2C
It was used to test this change.
Hi MakerMelissa, Thanks for processing this! I was wondering how to contribute my framebuf driver for the FeatherWIng SH1107 128x64 OLED. Since this is a new driver, I can't just do a PR.
https://github.com/mdroberts1243/mdroberts1243_CircuitPython_SH1107_I2C
Would appreciate your suggestions! -mark.
Hi. You may want to do a new library. Take a look at this guide: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library
The text() method did not account for rotations when checking if a character could be rendered to the framebuf. For example it would clip characters that exceeded the native width of the device (e.g. 64 wide for the SH1107 OLED) even though you had set rotation to use it horizontally (128) wide.
This change adjusts frame_width and frame_height checks, taking rotation setting into account.
Tested working with SH1107 128 x 64 OLED Featherwing in horizontal orientation on my own framebuf driver.