autotest: add force option to arm_vehicle

This commit is contained in:
Peter Barker 2021-07-01 12:45:02 +10:00 committed by Peter Barker
parent a6eaa77ff8
commit 85f36f957d
1 changed files with 5 additions and 2 deletions

View File

@ -3677,14 +3677,17 @@ class AutoTest(ABC):
target_compid=None,
))
def arm_vehicle(self, timeout=20):
def arm_vehicle(self, timeout=20, force=False):
"""Arm vehicle with mavlink arm message."""
self.progress("Arm motors with MAVLink cmd")
self.drain_mav()
p2 = 0
if force:
p2 = 2989
try:
self.run_cmd(mavutil.mavlink.MAV_CMD_COMPONENT_ARM_DISARM,
1, # ARM
0,
p2,
0,
0,
0,