From 93ac301b19b32b59963c9a4d21fd1fb7454c137e Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Sat, 19 Sep 2020 09:41:21 +0100 Subject: [PATCH] RC_Channel: conditionlly compile in ADSB support --- libraries/RC_Channel/RC_Channel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index 6ed059f9c8..150d93fd03 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -626,6 +626,7 @@ void RC_Channel::do_aux_function_armdisarm(const AuxSwitchPos ch_flag) void RC_Channel::do_aux_function_avoid_adsb(const AuxSwitchPos ch_flag) { +#if HAL_ADSB_ENABLED AP_Avoidance *avoidance = AP::ap_avoidance(); if (avoidance == nullptr) { return; @@ -650,6 +651,7 @@ void RC_Channel::do_aux_function_avoid_adsb(const AuxSwitchPos ch_flag) avoidance->disable(); AP::logger().Write_Event(LogEvent::AVOIDANCE_ADSB_DISABLE); gcs().send_text(MAV_SEVERITY_CRITICAL, "ADSB Avoidance Disabled"); +#endif } void RC_Channel::do_aux_function_avoid_proximity(const AuxSwitchPos ch_flag)