Browse Source

Tools: copter: wait_landed_and_disarmed: use wait_for_alt

c415-sdk
Pierre Kancir 5 years ago committed by Peter Barker
parent
commit
ebd13ac84e
  1. 9
      Tools/autotest/arducopter.py

9
Tools/autotest/arducopter.py

@ -152,10 +152,13 @@ class AutoTestCopter(AutoTest):
self.change_mode("LAND") self.change_mode("LAND")
self.wait_landed_and_disarmed(timeout=timeout) self.wait_landed_and_disarmed(timeout=timeout)
def wait_landed_and_disarmed(self, min_alt=4, timeout=60): def wait_landed_and_disarmed(self, min_alt=6, timeout=60):
"""Wait to be landed and disarmed""" """Wait to be landed and disarmed"""
self.wait_altitude(-5, min_alt, relative=True, timeout=timeout) m = self.mav.recv_match(type='GLOBAL_POSITION_INT', blocking=True)
self.progress("LANDING: ok!") alt = m.relative_alt / 1000.0 # mm -> m
if alt > min_alt:
self.wait_for_alt(min_alt, timeout=timeout)
# self.wait_statustext("SIM Hit ground", timeout=timeout)
self.wait_disarmed() self.wait_disarmed()
def hover(self, hover_throttle=1500): def hover(self, hover_throttle=1500):

Loading…
Cancel
Save