autotest: prompt MAVProxy to do streamrate stuff after restarting SITL

This commit is contained in:
Peter Barker 2019-12-11 11:51:42 +11:00 committed by Peter Barker
parent 91c6a8c1d8
commit 516219533d
1 changed files with 6 additions and 0 deletions

View File

@ -453,6 +453,10 @@ class AutoTest(ABC):
self.stop_SITL()
self.start_SITL(customisations=customisations, wipe=False)
self.wait_heartbeat()
# MAVProxy only checks the streamrates once every 15 seconds.
# Encourage it:
self.set_streamrate(self.sitl_streamrate()+1)
self.set_streamrate(self.sitl_streamrate())
# we also need to wait for MAVProxy to requests streams again
# - in particular, RC_CHANNELS.
m = self.mav.recv_match(type='RC_CHANNELS', blocking=True, timeout=15)
@ -463,6 +467,8 @@ class AutoTest(ABC):
self.progress("Resetting SITL commandline to default")
self.stop_SITL()
self.start_SITL(wipe=False)
self.set_streamrate(self.sitl_streamrate()+1)
self.set_streamrate(self.sitl_streamrate())
self.progress("Reset SITL commandline to default")
def stop_SITL(self):