diff --git a/libraries/AP_Vehicle/AP_Vehicle.h b/libraries/AP_Vehicle/AP_Vehicle.h index 24b542d891..b2783f3cb5 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.h +++ b/libraries/AP_Vehicle/AP_Vehicle.h @@ -317,7 +317,9 @@ protected: AP_GPS gps; #endif AP_Baro barometer; +#if AP_COMPASS_ENABLED Compass compass; +#endif #if AP_INERTIALSENSOR_ENABLED AP_InertialSensor ins; #endif