autotest: augment delay_sim_time debug
This commit is contained in:
parent
73a3b5f832
commit
d9501766c7
@ -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…
Reference in New Issue
Block a user