mirror of https://github.com/ArduPilot/ardupilot
autotest: reconnect mavlink when starting SITL
.... self.mav corresponds to the SITL we're starting here. If we have previously connected to it then reconnect, as we know the connection will be bad
This commit is contained in:
parent
bfaf024fc3
commit
909068e1e5
|
@ -8124,6 +8124,11 @@ Also, ignores heartbeats not from our target system'''
|
||||||
self.sup_prog.append(sup_prog_link)
|
self.sup_prog.append(sup_prog_link)
|
||||||
self.expect_list_add(sup_prog_link)
|
self.expect_list_add(sup_prog_link)
|
||||||
|
|
||||||
|
# mavlink will have disconnected here. Explicitly reconnect,
|
||||||
|
# or the first packet we send will be lost:
|
||||||
|
if self.mav is not None:
|
||||||
|
self.mav.reconnect()
|
||||||
|
|
||||||
def get_suplementary_programs(self):
|
def get_suplementary_programs(self):
|
||||||
return self.sup_prog
|
return self.sup_prog
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue