From 4733f571027d6f1f3b7569f3d4348164938015ec Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 5 Jan 2022 21:26:39 +1100 Subject: [PATCH] RC_Channel: don't use avoidance on plane --- libraries/RC_Channel/RC_Channel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index cdfdd80598..f1a03e1d47 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -46,6 +46,7 @@ extern const AP_HAL::HAL& hal; #include #include #include +#include #define SWITCH_DEBOUNCE_TIME_MS 200 @@ -689,6 +690,7 @@ void RC_Channel::do_aux_function_avoid_adsb(const AuxSwitchPos ch_flag) void RC_Channel::do_aux_function_avoid_proximity(const AuxSwitchPos ch_flag) { +#if !APM_BUILD_TYPE(APM_BUILD_ArduPlane) AC_Avoid *avoid = AP::ac_avoid(); if (avoid == nullptr) { return; @@ -705,6 +707,7 @@ void RC_Channel::do_aux_function_avoid_proximity(const AuxSwitchPos ch_flag) avoid->proximity_avoidance_enable(false); break; } +#endif // !APM_BUILD_ArduPlane } void RC_Channel::do_aux_function_camera_trigger(const AuxSwitchPos ch_flag)