You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
LVGLTest: use subwindow so everything gets cleaned
This commit is contained in:
@@ -15,11 +15,11 @@ canary.add_flag(0x0001) # LV_OBJ_FLAG_HIDDEN is 0x0001
|
||||
def add_spinner_and_update():
|
||||
global spinner_count, metrics_label
|
||||
try:
|
||||
spinner = lv.spinner(lv.screen_active())
|
||||
spinner = lv.spinner(subwindow)
|
||||
spinner.set_size(SPINNER_SIZE, SPINNER_SIZE)
|
||||
spinner.set_pos(
|
||||
random.randint(0, lv.screen_active().get_width() - SPINNER_SIZE),
|
||||
random.randint(0, lv.screen_active().get_height() - SPINNER_SIZE)
|
||||
random.randint(0, subwindow.get_width() - SPINNER_SIZE),
|
||||
random.randint(0, subwindow.get_height() - SPINNER_SIZE)
|
||||
)
|
||||
spinner_count += 1
|
||||
except Exception as e:
|
||||
@@ -33,7 +33,7 @@ def run_benchmark():
|
||||
global spinner_count, metrics_label
|
||||
print("Starting LVGL spinner benchmark...")
|
||||
|
||||
scr = lv.screen_active()
|
||||
scr = subwindow
|
||||
scr.set_style_bg_color(lv.color_black(), 0)
|
||||
|
||||
metrics_label = lv.label(scr)
|
||||
|
||||
Reference in New Issue
Block a user