diff --git a/libraries/AP_ADSB/AP_ADSB.cpp b/libraries/AP_ADSB/AP_ADSB.cpp index 7005d23c19..9db47650cd 100644 --- a/libraries/AP_ADSB/AP_ADSB.cpp +++ b/libraries/AP_ADSB/AP_ADSB.cpp @@ -32,6 +32,10 @@ #include #include +#ifndef ADSB_SAGETECH_ENABLED + #define ADSB_SAGETECH_ENABLED !HAL_MINIMIZE_FEATURES +#endif + //#define ADSB_STATIC_CALLSIGN "APM1234" // 8 ASCII chars of a Callsign. This can be overwritten by MAVLink msg UAVIONIX_ADSB_OUT_CFG @@ -182,9 +186,12 @@ void AP_ADSB::hw_init(void) return; } +#if ADSB_SAGETECH_ENABLED if (AP_ADSB_Sagetech::detect()) { backend = new AP_ADSB_Sagetech(*this); - } else { + } else +#endif + { backend = new AP_ADSB_MAVLink(*this); }