From 9a430b1cdaada00b2871b166b169dbaae3024036 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 7 Mar 2024 21:21:27 +1100 Subject: [PATCH] ArduPlane: remove AUX_FUNC entries based on feature defines --- ArduPlane/Parameters.cpp | 6 ++++++ ArduPlane/RC_Channel.cpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ArduPlane/Parameters.cpp b/ArduPlane/Parameters.cpp index 2c4d9cfed6c561..c8d7b527bf355c 100644 --- a/ArduPlane/Parameters.cpp +++ b/ArduPlane/Parameters.cpp @@ -1362,9 +1362,15 @@ struct RCConversionInfo { static const RCConversionInfo rc_option_conversion[] = { { Parameters::k_param_flapin_channel_old, 0, RC_Channel::AUX_FUNC::FLAP}, { Parameters::k_param_g2, 968, RC_Channel::AUX_FUNC::SOARING}, +#if AP_FENCE_ENABLED { Parameters::k_param_fence_channel, 0, RC_Channel::AUX_FUNC::FENCE}, +#endif +#if AP_MISSION_ENABLED { Parameters::k_param_reset_mission_chan, 0, RC_Channel::AUX_FUNC::MISSION_RESET}, +#endif +#if HAL_PARACHUTE_ENABLED { Parameters::k_param_parachute_channel, 0, RC_Channel::AUX_FUNC::PARACHUTE_RELEASE}, +#endif { Parameters::k_param_fbwa_tdrag_chan, 0, RC_Channel::AUX_FUNC::FBWA_TAILDRAGGER}, { Parameters::k_param_reset_switch_chan, 0, RC_Channel::AUX_FUNC::MODE_SWITCH_RESET}, }; diff --git a/ArduPlane/RC_Channel.cpp b/ArduPlane/RC_Channel.cpp index 573b7ae0411c72..c8af5516bc6ac0 100644 --- a/ArduPlane/RC_Channel.cpp +++ b/ArduPlane/RC_Channel.cpp @@ -157,7 +157,9 @@ void RC_Channel_Plane::init_aux_function(const RC_Channel::AUX_FUNC ch_option, case AUX_FUNC::FBWA_TAILDRAGGER: case AUX_FUNC::FWD_THR: case AUX_FUNC::LANDING_FLARE: +#if HAL_PARACHUTE_ENABLED case AUX_FUNC::PARACHUTE_RELEASE: +#endif case AUX_FUNC::MODE_SWITCH_RESET: case AUX_FUNC::CRUISE: #if HAL_QUADPLANE_ENABLED