Tools: wait for vehicle to disarm after handling throttle failsafe
This commit is contained in:
parent
5ea1784838
commit
dd09bb338e
@ -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…
Reference in New Issue
Block a user