From 82a4bb51a8a33f2ca166d705a432a214df38a55b Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 4 Sep 2024 22:25:12 +1000 Subject: [PATCH] autotest: add test for arming in guided with non-zero throttle --- Tools/autotest/arducopter.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index 8c0605798efe8..1f65a75fee455 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -11889,6 +11889,23 @@ def ScriptingAHRSSource(self): self.set_rc(10, 2000) self.wait_statustext('Using EKF Source Set 3', check_context=True) + def GUIDEDArmingCheckThrottle(self): + '''check the way throttle is handled when arming in guided mode''' + self.change_mode('GUIDED') + self.wait_ready_to_arm() + self.start_subtest("With zero throttle should be able to arm") + self.arm_vehicle() + self.disarm_vehicle() + + self.start_subtest("Without option set we should be able to arm with non-zero throttle in guided") + self.set_rc(3, 1600) + self.arm_vehicle() + self.disarm_vehicle() + + self.start_subtest("With option enabled should not be able to arm with non-zero throttle") + self.set_parameter("GUID_OPTIONS", 1 << 8) + self.assert_arm_failure("is not neutral") + def tests2b(self): # this block currently around 9.5mins here '''return list of all tests''' ret = ([ @@ -11992,6 +12009,7 @@ def tests2b(self): # this block currently around 9.5mins here self.BatteryInternalUseOnly, self.MAV_CMD_MISSION_START_p1_p2, self.ScriptingAHRSSource, + self.GUIDEDArmingCheckThrottle, ]) return ret