diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_config.h b/libraries/AP_RangeFinder/AP_RangeFinder_config.h index ed10e44160..b0aa192eaf 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_config.h +++ b/libraries/AP_RangeFinder/AP_RangeFinder_config.h @@ -4,6 +4,7 @@ #include #include #include +#include #ifndef AP_RANGEFINDER_ENABLED #define AP_RANGEFINDER_ENABLED 1 @@ -97,7 +98,7 @@ #endif #ifndef AP_RANGEFINDER_MAVLINK_ENABLED -#define AP_RANGEFINDER_MAVLINK_ENABLED AP_RANGEFINDER_BACKEND_DEFAULT_ENABLED +#define AP_RANGEFINDER_MAVLINK_ENABLED AP_RANGEFINDER_BACKEND_DEFAULT_ENABLED && HAL_GCS_ENABLED #endif #ifndef AP_RANGEFINDER_MAXBOTIX_SERIAL_ENABLED