Browse Source

autotest: drain mav before receiving system_time in get_sim_time

zr-v5.1
Peter Barker 4 years ago committed by Peter Barker
parent
commit
e567cca230
  1. 1
      Tools/autotest/common.py

1
Tools/autotest/common.py

@ -2673,6 +2673,7 @@ class AutoTest(ABC): @@ -2673,6 +2673,7 @@ class AutoTest(ABC):
#################################################
def get_sim_time(self, timeout=60):
"""Get SITL time in seconds."""
self.drain_mav()
m = self.mav.recv_match(type='SYSTEM_TIME', blocking=True, timeout=timeout)
if m is None:
raise AutoTestTimeoutException("Did not get SYSTEM_TIME message after %f seconds" % timeout)

Loading…
Cancel
Save