Browse Source

autotest: augment delay_sim_time debug

c415-sdk
Peter Barker 4 years ago committed by Peter Barker
parent
commit
d9501766c7
  1. 7
      Tools/autotest/common.py

7
Tools/autotest/common.py

@ -4676,12 +4676,15 @@ class AutoTest(ABC): @@ -4676,12 +4676,15 @@ class AutoTest(ABC):
#################################################
# WAIT UTILITIES
#################################################
def delay_sim_time(self, seconds_to_wait):
def delay_sim_time(self, seconds_to_wait, reason=None):
"""Wait some second in SITL time."""
self.drain_mav()
tstart = self.get_sim_time()
tnow = tstart
self.progress("Delaying %f seconds" % (seconds_to_wait,))
r = "Delaying %f seconds"
if reason is None:
r += "for %s" % reason
self.progress(r % (seconds_to_wait,))
while tstart + seconds_to_wait > tnow:
tnow = self.get_sim_time()

Loading…
Cancel
Save