Skip to content

Commit

Permalink
increase intial sleep for port check, otherwise it ccould fail on pi4
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed Nov 29, 2023
1 parent 8384004 commit c1dbeb5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/hil/hil_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,14 @@ def open_serial_dev(port):
if os.path.exists(port):
try:
# slight delay since kernel may occupy the port briefly
time.sleep(0.2)
time.sleep(0.5)
timeout = timeout - 0.5
ser = serial.Serial(port, timeout=1)
break
except serial.SerialException:
pass
time.sleep(0.8)
timeout = timeout - 1
time.sleep(0.5)
timeout = timeout - 0.5
assert timeout, 'Device not available or Cannot open port'
return ser

Expand Down

0 comments on commit c1dbeb5

Please sign in to comment.