Browse Source

RC_Channel: conditionlly compile in ADSB support

zr-v5.1
Andy Piper 4 years ago committed by Andrew Tridgell
parent
commit
93ac301b19
  1. 2
      libraries/RC_Channel/RC_Channel.cpp

2
libraries/RC_Channel/RC_Channel.cpp

@ -626,6 +626,7 @@ void RC_Channel::do_aux_function_armdisarm(const AuxSwitchPos ch_flag) @@ -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) @@ -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)

Loading…
Cancel
Save