Browse Source

Tools: autotest: add disarm_wait function

mission-4.1.18
Peter Barker 5 years ago committed by Peter Barker
parent
commit
2e2bbf57bf
  1. 9
      Tools/autotest/common.py

9
Tools/autotest/common.py

@ -1057,6 +1057,15 @@ class AutoTest(ABC): @@ -1057,6 +1057,15 @@ class AutoTest(ABC):
self.progress("Failed to DISARM with switch")
return False
def disarm_wait(self, timeout=10):
tstart = self.get_sim_time()
while True:
if self.get_sim_time_cached() - tstart > timeout:
raise NotAchievedException("Did not disarm")
self.wait_heartbeat()
if not self.mav.motors_armed():
return
def wait_autodisarm_motors(self):
"""Wait for Autodisarm motors within disarm delay
this feature is only available in copter (DISARM_DELAY) and plane (LAND_DISARMDELAY)."""

Loading…
Cancel
Save