Browse Source

Tools: wait for vehicle to disarm after handling throttle failsafe

mission-4.1.18
Peter Barker 8 years ago committed by Francisco Ferreira
parent
commit
dd09bb338e
  1. 7
      Tools/autotest/arducopter.py

7
Tools/autotest/arducopter.py

@ -307,9 +307,14 @@ def fly_throttle_failsafe(mavproxy, mav, side=60, timeout=180): @@ -307,9 +307,14 @@ def fly_throttle_failsafe(mavproxy, mav, side=60, timeout=180):
# switch back to stabilize
mavproxy.send('switch 2\n') # land mode
wait_mode(mav, 'LAND')
print("Waiting for disarm")
mav.motors_disarmed_wait()
print("Reached failsafe home OK")
mavproxy.send('switch 6\n') # stabilize mode
wait_mode(mav, 'STABILIZE')
print("Reached failsafe home OK")
if not arm_motors(mavproxy, mav):
print("Failed to re-arm")
return False
return True
print("Failed to land on failsafe RTL - timed out after %u seconds" % timeout)
# reduce throttle

Loading…
Cancel
Save