From f1c4797ef48c682898364fb06a5627456e0ac60b Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Wed, 27 Jul 2022 19:44:26 +0100 Subject: [PATCH] Tools: autotest: copter: rangefinder mavlink enable landing gear --- Tools/autotest/arducopter.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index 707b4d58ee..43e45d7fe1 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -6986,7 +6986,13 @@ class AutoTestCopter(AutoTest): def fly_rangefinder_mavlink_distance_sensor(self): self.start_subtest("Test mavlink rangefinder using DISTANCE_SENSOR messages") self.context_push() - self.set_parameter('RTL_ALT_TYPE', 0) + self.set_parameters({ + "RTL_ALT_TYPE": 0, + "LGR_ENABLE": 1, + "LGR_DEPLOY_ALT": 1, + "LGR_RETRACT_ALT": 10, # metres + "SERVO10_FUNCTION": 29 + }) ex = None try: self.set_parameter("SERIAL5_PROTOCOL", 1) @@ -7039,11 +7045,6 @@ class AutoTestCopter(AutoTest): 255 # covariance ) self.arm_vehicle() - self.set_parameters({ - "SERVO10_FUNCTION": 29, - "LGR_DEPLOY_ALT": 1, - "LGR_RETRACT_ALT": 10, # metres - }) self.delay_sim_time(1) # servo function maps only periodically updated # self.send_debug_trap()