ublox-config: Make sure that device is available before sending commands
BugzID: 56371
This commit is contained in:
parent
7ee9cc8cce
commit
eedea0b72d
|
|
@ -7,7 +7,12 @@ import os
|
|||
|
||||
MAX_TRY = 5
|
||||
tries = 0
|
||||
ser = serial.Serial('/dev/ttyACM0', 115200, timeout=0.5)
|
||||
SERIAL_DEV = '/dev/ttyACM0'
|
||||
|
||||
while not os.path.exists(SERIAL_DEV):
|
||||
time.sleep(1)
|
||||
|
||||
ser = serial.Serial(SERIAL_DEV, 115200, timeout=0.5)
|
||||
|
||||
def execute_and_check(cmd):
|
||||
global tries
|
||||
|
|
|
|||
Loading…
Reference in New Issue