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:
Peter Barker 2023-05-29 12:57:19 +10:00 committed by Peter Barker
parent bfaf024fc3
commit 909068e1e5
1 changed files with 5 additions and 0 deletions

View File

@ -8124,6 +8124,11 @@ Also, ignores heartbeats not from our target system'''
self.sup_prog.append(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):
return self.sup_prog