You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
lilygo_t_display_s3: different rotation so buttons make sense
Otherwise, with 90 degree rotation, the PREV and NEXT buttons should be swapped. With 270 degree rotation, they can remain.
This commit is contained in:
@@ -58,14 +58,14 @@ mpos.ui.main_display.init()
|
||||
mpos.ui.main_display.set_backlight(100) # works
|
||||
|
||||
lv.init()
|
||||
mpos.ui.main_display.set_rotation(lv.DISPLAY_ROTATION._90) # must be done after initializing display and creating the touch drivers, to ensure proper handling
|
||||
mpos.ui.main_display.set_rotation(lv.DISPLAY_ROTATION._270) # must be done after initializing display and creating the touch drivers, to ensure proper handling
|
||||
mpos.ui.main_display.set_color_inversion(True)
|
||||
|
||||
|
||||
# Button handling code:
|
||||
from machine import Pin
|
||||
btn_a = Pin(0, Pin.IN, Pin.PULL_UP) # 1
|
||||
btn_b = Pin(14, Pin.IN, Pin.PULL_UP) # 2
|
||||
btn_a = Pin(0, Pin.IN, Pin.PULL_UP)
|
||||
btn_b = Pin(14, Pin.IN, Pin.PULL_UP)
|
||||
|
||||
# Key repeat configuration
|
||||
# This whole debounce logic is only necessary because LVGL 9.2.2 seems to have an issue where
|
||||
|
||||
Reference in New Issue
Block a user