Skip to content

Commit

Permalink
ArduPlane: remove AUX_FUNC entries based on feature defines
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Aug 7, 2024
1 parent 84b4783 commit 8631074
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ArduPlane/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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},
};
Expand Down
2 changes: 2 additions & 0 deletions ArduPlane/RC_Channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8631074

Please sign in to comment.