diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index d89ffa43f5ea63..92886b132f2af7 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -115,9 +115,6 @@ def close(self): def is_copter(self): return True - def get_stick_arming_channel(self): - return int(self.get_parameter("RCMAP_YAW")) - def get_disarm_delay(self): return int(self.get_parameter("DISARM_DELAY")) diff --git a/Tools/autotest/arduplane.py b/Tools/autotest/arduplane.py index 636575f57cb318..959ef6d82a39cc 100644 --- a/Tools/autotest/arduplane.py +++ b/Tools/autotest/arduplane.py @@ -86,9 +86,6 @@ def apply_defaultfile_parameters(self): def is_plane(self): return True - def get_stick_arming_channel(self): - return int(self.get_parameter("RCMAP_YAW")) - def get_disarm_delay(self): return int(self.get_parameter("LAND_DISARMDELAY")) diff --git a/Tools/autotest/default_params/vee-gull 005.param b/Tools/autotest/default_params/vee-gull 005.param index 710889e2d7b0d8..5c34436e541e2f 100644 --- a/Tools/autotest/default_params/vee-gull 005.param +++ b/Tools/autotest/default_params/vee-gull 005.param @@ -451,10 +451,6 @@ RC9_MAX,1900 RC9_MIN,1100 RC9_REVERSED,0 RC9_TRIM,1500 -RCMAP_PITCH,2 -RCMAP_ROLL,1 -RCMAP_THROTTLE,3 -RCMAP_YAW,4 RELAY_DEFAULT,0 RELAY1_PIN,13 RLL_RATE_D,0.000000 diff --git a/Tools/autotest/param_metadata/mdemit.py b/Tools/autotest/param_metadata/mdemit.py index e6edba803bd8c0..48dfd28dd67b81 100644 --- a/Tools/autotest/param_metadata/mdemit.py +++ b/Tools/autotest/param_metadata/mdemit.py @@ -8,7 +8,7 @@ import os # Parameter groups disabled at compile time (Vehicle-specific) -sub_blacklist = ['AVOID_', 'CIRCLE_', 'FLOW', 'MIS_', 'PRX', 'RALLY_', 'RCMAP_', 'RPM', 'TERRAIN_', 'WPNAV_'] +sub_blacklist = ['AVOID_', 'CIRCLE_', 'FLOW', 'MIS_', 'PRX', 'RALLY_', 'RPM', 'TERRAIN_', 'WPNAV_'] # Parameter groups with redundant information (ie RCn_, SERVOn_) # We can keep the documentation concise by only documenting these once diff --git a/Tools/autotest/quadplane.py b/Tools/autotest/quadplane.py index 1207691fc76650..0289d2e05c0b4a 100644 --- a/Tools/autotest/quadplane.py +++ b/Tools/autotest/quadplane.py @@ -81,9 +81,6 @@ def defaults_filepath(self): def is_plane(self): return True - def get_stick_arming_channel(self): - return int(self.get_parameter("RCMAP_YAW")) - def get_disarm_delay(self): return int(self.get_parameter("LAND_DISARMDELAY")) diff --git a/Tools/autotest/rover.py b/Tools/autotest/rover.py index 8fbf383e10ee41..49400fc5a2b316 100644 --- a/Tools/autotest/rover.py +++ b/Tools/autotest/rover.py @@ -76,8 +76,9 @@ def default_speedup(self): def is_rover(self): return True - def get_stick_arming_channel(self): - return int(self.get_parameter("RCMAP_ROLL")) + def rc_option_value_for_arming_channel(self): + # Rover uses the "steer" channel for arming + return 205 ########################################################## # TESTS DRIVE diff --git a/Tools/autotest/vehicle_test_suite.py b/Tools/autotest/vehicle_test_suite.py index 5b7e4f54b7ecdc..1bc3f20347b405 100644 --- a/Tools/autotest/vehicle_test_suite.py +++ b/Tools/autotest/vehicle_test_suite.py @@ -5251,10 +5251,6 @@ def set_output_to_trim(self, chan): out_trim = int(self.get_parameter("RC%u_TRIM" % chan)) self.set_rc(chan, out_trim) - def get_stick_arming_channel(self): - """Return the Rudder channel number as set in parameter.""" - raise ErrorException("Rudder parameter is not supported by vehicle %s frame %s", (self.vehicleinfo_key(), self.frame)) - def get_disarm_delay(self): """Return disarm delay value.""" raise ErrorException("Disarm delay is not supported by vehicle %s frame %s", (self.vehicleinfo_key(), self.frame)) @@ -5286,6 +5282,22 @@ def set_safetyswitch(self, value, target_system=1, target_component=1): timeout=30 ) + def max_rc_channels(self): + return 16 + + def rc_option_value_for_arming_channel(self): + return 204 + + def get_stick_arming_channel(self): + option = self.rc_option_value_for_arming_channel() + for i in range(1, self.max_rc_channels() + 1): + v = self.get_parameter("RC%u_OPTION" % i) + self.progress("v=%u" % v) + if v == option: + self.progress("yaw is on channel %u" % i) + return i + raise PreconditionFailedException("No stick arming channel configured") + def armed(self): """Return true if vehicle is armed and safetyoff""" self.wait_heartbeat()