zmk icon indicating copy to clipboard operation
zmk copied to clipboard

Software Rotation Fails for Monochrome Displays

Open Nicell opened this issue 2 years ago • 2 comments

Currently, if you try to turn on LVGL software rotation (sw_rotate), it fails on monochrome displays like the SSD1306 OLEDs and LS011xx nice!views.

Why? It seems from a quick look that the software rotation code on LVGL's side doesn't like how the Zephyr glue code packs the monochrome display bits.

What should we do? I haven't looked closely, but it seems that either the Zephyr glue code could be updated to allow for LVGL's software rotation to work nicely together or LVGL's software rotation could somehow be updated to work with monochrome bit packing.

Related issues: https://github.com/zephyrproject-rtos/zephyr/issues/46446 https://github.com/lvgl/lvgl/issues/3414

Nicell avatar Apr 11 '23 00:04 Nicell

Hey, do you know if there is a quick fix for this? I have been reading the other issues and the patche mentioned don't seem applicable to the current version of Zephyr.

rainhood avatar Feb 28 '24 14:02 rainhood

For nice!view Nicell ended up using a canvas then rotating it 90 degrees before drawing: https://github.com/zmkfirmware/zmk/blob/c9c620d19f603ea0c9d4264eff885912803ff74d/app/boards/shields/nice_view/widgets/util.c#L13

caksoylar avatar Feb 28 '24 18:02 caksoylar