Skip to content

Commit 7673e08

Browse files
committed
updates touch calibration
1 parent 0f64af3 commit 7673e08

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

api_drivers/py_api_drivers/frozen/indev/touch_calibration/touch_calibrate.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,27 @@ def calibrate(indev, cal_data):
7272
indev.enable(False)
7373

7474
new_scrn = lv.obj()
75-
lv.screen_load(new_scrn)
76-
7775
new_scrn.add_style(style, 0)
7876

77+
label = lv.label(new_scrn)
78+
label.set_text('Touch Calibration')
79+
label.center()
80+
81+
lv.screen_load_anim(new_scrn, lv.SCR_LOAD_ANIM.FADE_IN, 500, 0, False)
82+
83+
count = 0
84+
while count < 200:
85+
count += 1
86+
lcd_bus._pump_main_thread()
87+
time.sleep_ms(5)
88+
89+
label.delete()
90+
count = 0
91+
while count < 100:
92+
count += 1
93+
lcd_bus._pump_main_thread()
94+
time.sleep_ms(5)
95+
7996
target = lv.obj(new_scrn)
8097
target.add_style(style, 0)
8198
target.set_size(20, 20)

0 commit comments

Comments
 (0)