From bac008d51c6808d97922eaf820bea5dd2db5a264 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 22 May 2024 14:29:39 +1000 Subject: [PATCH] autotest: tidy pre_arm_checks --- Tools/autotest/arduplane.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Tools/autotest/arduplane.py b/Tools/autotest/arduplane.py index b69a8f5d86..f94188e682 100644 --- a/Tools/autotest/arduplane.py +++ b/Tools/autotest/arduplane.py @@ -5443,6 +5443,19 @@ class AutoTestPlane(vehicle_test_suite.TestSuite): self.context_pop() self.reboot_sitl() + def GPSPreArms(self): + '''ensure GPS prearm checks work''' + self.wait_ready_to_arm() + self.start_subtest('DroneCAN sanity checks') + self.set_parameter('GPS1_TYPE', 9) + self.set_parameter('GPS2_TYPE', 9) + self.set_parameter('GPS1_CAN_OVRIDE', 130) + self.set_parameter('GPS2_CAN_OVRIDE', 130) + self.assert_prearm_failure( + "set for multiple GPS", + other_prearm_failures_fatal=False, + ) + def tests(self): '''return list of all tests''' ret = super(AutoTestPlane, self).tests() @@ -5555,6 +5568,7 @@ class AutoTestPlane(vehicle_test_suite.TestSuite): self.ClimbThrottleSaturation, self.GuidedAttitudeNoGPS, self.ScriptStats, + self.GPSPreArms, ]) return ret