From 7842f55a3b1b39f2c8b33ac21d1b48c091164ca1 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 17 Jun 2021 16:03:36 +1000 Subject: [PATCH] Tools: add rc channel option to disable all airspeed sensors --- Tools/autotest/arduplane.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Tools/autotest/arduplane.py b/Tools/autotest/arduplane.py index b873a678cd..2ec182e599 100644 --- a/Tools/autotest/arduplane.py +++ b/Tools/autotest/arduplane.py @@ -2927,6 +2927,28 @@ class AutoTestPlane(AutoTest): self.fly_mission(mission_file, strict=False, quadplane=quadplane) self.wait_disarmed() + def RCDisableAirspeedUse(self): + self.set_parameter("RC9_OPTION", 106) + self.delay_sim_time(5) + self.set_rc(9, 1000) + self.wait_sensor_state( + mavutil.mavlink.MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE, + True, + True, + True) + self.set_rc(9, 2000) + self.wait_sensor_state( + mavutil.mavlink.MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE, + True, + False, + True) + self.set_rc(9, 1000) + self.wait_sensor_state( + mavutil.mavlink.MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE, + True, + True, + True) + def tests(self): '''return list of all tests''' ret = super(AutoTestPlane, self).tests() @@ -3120,6 +3142,10 @@ class AutoTestPlane(AutoTest): "Fly each supported internal frame", self.fly_each_frame), + ("RCDisableAirspeedUse", + "Test RC DisableAirspeedUse option", + self.RCDisableAirspeedUse), + ("LogUpload", "Log upload", self.log_upload),