Browse Source

autotest: explicltly dis/reconnect when customising commandline

We *know* the connection is going away, so wecan force the reconnect rather than waiting for mavtcp's reconnect logic to kick in
master
Peter Barker 2 years ago committed by Peter Barker
parent
commit
b6c4930b3a
  1. 2
      Tools/autotest/common.py

2
Tools/autotest/common.py

@ -2517,11 +2517,13 @@ class AutoTest(ABC):
set_streamrate_callback=None): set_streamrate_callback=None):
'''customisations could be "--uartF=sim:nmea" ''' '''customisations could be "--uartF=sim:nmea" '''
self.contexts[-1].sitl_commandline_customised = True self.contexts[-1].sitl_commandline_customised = True
self.mav.close()
self.stop_SITL() self.stop_SITL()
self.start_SITL(model=model, self.start_SITL(model=model,
defaults_filepath=defaults_filepath, defaults_filepath=defaults_filepath,
customisations=customisations, customisations=customisations,
wipe=wipe) wipe=wipe)
self.mav.do_connect()
tstart = time.time() tstart = time.time()
while True: while True:
if time.time() - tstart > 30: if time.time() - tstart > 30:

Loading…
Cancel
Save