Skip to content

Commit ad26502

Browse files
committed
Update instruction text to match the square target shape drawn on the display
1 parent b1ac8ff commit ad26502

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def calibrate(indev, cal_data):
109109
target.remove_flag(lv.obj.FLAG.CHECKABLE) # NOQA
110110
target.remove_flag(lv.obj.FLAG.SCROLLABLE) # NOQA
111111

112+
instruction_text = 'Press and hold\n red square'
112113
for i in range(3):
113114
print('point', i + 1, 'of 3')
114115

@@ -119,7 +120,7 @@ def calibrate(indev, cal_data):
119120
lcd_bus._pump_main_thread() # NOQA
120121
time.sleep_ms(2000) # NOQA
121122

122-
label.set_text('Press and hold\n red circle')
123+
label.set_text(instruction_text)
123124
label.center()
124125
lcd_bus._pump_main_thread() # NOQA
125126

@@ -142,7 +143,7 @@ def calibrate(indev, cal_data):
142143
if text_on:
143144
label.set_text('')
144145
else:
145-
label.set_text('Press and hold\n red circle')
146+
label.set_text(instruction_text)
146147
label.center()
147148

148149
text_on = not text_on
@@ -209,6 +210,7 @@ def calibrate(indev, cal_data):
209210
# else:
210211
# mirror_y = False
211212

213+
# The 3 point method uses an affine transformation so mirroring should not be needed.
212214
mirror_x = False
213215
mirror_y = False
214216

0 commit comments

Comments
 (0)