You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Higher framerate at the expense of CPU
This commit is contained in:
@@ -59,7 +59,7 @@ i2c_bus = i2c.I2C.Bus(host=I2C_BUS, scl=TP_SCL, sda=TP_SDA, freq=I2C_FREQ, use_l
|
||||
touch_dev = i2c.I2C.Device(bus=i2c_bus, dev_id=TP_ADDR, reg_bits=TP_REGBITS)
|
||||
indev=cst816s.CST816S(touch_dev,startup_rotation=lv.DISPLAY_ROTATION._180) # button in top left, good
|
||||
|
||||
th = task_handler.TaskHandler()
|
||||
lv.init()
|
||||
display.set_rotation(lv.DISPLAY_ROTATION._90)
|
||||
|
||||
# Gesture IDs:
|
||||
|
||||
@@ -47,6 +47,7 @@ wifi_screen=None
|
||||
drawer_open=False
|
||||
bar_open=True
|
||||
|
||||
th = task_handler.TaskHandler(duration=6)
|
||||
|
||||
rootscreen = lv.screen_active()
|
||||
rootlabel = lv.label(rootscreen)
|
||||
@@ -190,7 +191,7 @@ slider_label.align(lv.ALIGN.TOP_MID,0,PADDING_SMALL)
|
||||
slider=lv.slider(drawer)
|
||||
slider.set_range(SLIDER_MIN_VALUE,SLIDER_MAX_VALUE)
|
||||
slider.set_value(SLIDER_DEFAULT_VALUE,False)
|
||||
slider.set_width(TFT_HOR_RES-PADDING_LARGE)
|
||||
slider.set_width(lv.pct(80))
|
||||
slider.align_to(slider_label,lv.ALIGN.OUT_BOTTOM_MID,0,PADDING_SMALL)
|
||||
slider.set_style_bg_color(COLOR_SLIDER_BG,lv.PART.MAIN)
|
||||
slider.set_style_bg_color(COLOR_SLIDER_INDICATOR,lv.PART.INDICATOR)
|
||||
|
||||
Reference in New Issue
Block a user