Tools: add rc channel option to disable all airspeed sensors

This commit is contained in:
Peter Barker 2021-06-17 16:03:36 +10:00 committed by Peter Barker
parent 5d6b733d6d
commit 7842f55a3b

View File

@ -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),