From c9e9b13404b19933aeb6038cd5e801288227fb47 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Dec 2024 09:58:58 +1100 Subject: [PATCH] autotest: fixed race in MinAltFenceAvoid copter test --- Tools/autotest/arducopter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index 2d968b900d..d6325334cc 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -1719,8 +1719,6 @@ class AutoTestCopter(vehicle_test_suite.TestSuite): # Also check that the vehicle will not try and ascend too fast when trying to backup from a min alt fence due to avoidance def MinAltFenceAvoid(self): '''Test Min Alt Fence Avoidance''' - self.takeoff(30, mode="LOITER") - """Hold loiter position.""" # enable fence, only min altitude # No action, rely on avoidance to prevent the breach @@ -1731,6 +1729,9 @@ class AutoTestCopter(vehicle_test_suite.TestSuite): "FENCE_ACTION": 0, }) + self.takeoff(30, mode="LOITER") + """Hold loiter position.""" + # Try and fly past the fence self.set_rc(3, 1120)