mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-12 00:10:58 +00:00
tests/production_tests: in touch test, wait for TOUCH_START first
This commit is contained in:
parent
49cc4651c2
commit
0aa8cbfe51
@ -63,7 +63,12 @@ def test_touch(v):
|
|||||||
while io.poll([io.TOUCH], r, 10000):
|
while io.poll([io.TOUCH], r, 10000):
|
||||||
pass
|
pass
|
||||||
# wait for event
|
# wait for event
|
||||||
|
touch = False
|
||||||
while True:
|
while True:
|
||||||
|
if not touch:
|
||||||
|
if io.poll([io.TOUCH], r, 10000) and r[0] == io.TOUCH and r[1][0] == io.TOUCH_START:
|
||||||
|
touch = True
|
||||||
|
else:
|
||||||
if io.poll([io.TOUCH], r, 10000) and r[0] == io.TOUCH and r[1][0] == io.TOUCH_END:
|
if io.poll([io.TOUCH], r, 10000) and r[0] == io.TOUCH and r[1][0] == io.TOUCH_END:
|
||||||
print('OK %d %d' % (r[1][1], r[1][2]))
|
print('OK %d %d' % (r[1][1], r[1][2]))
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user