diff --git a/ArduPlane/Plane.h b/ArduPlane/Plane.h index 3eb06c33cf3b75..5369536a434466 100644 --- a/ArduPlane/Plane.h +++ b/ArduPlane/Plane.h @@ -83,7 +83,10 @@ #include #include // Landing Gear library #include +#include +#if AP_EXTERNAL_CONTROL_ENABLED #include +#endif #include "GCS_Mavlink.h" #include "GCS_Plane.h" @@ -772,7 +775,9 @@ class Plane : public AP_Vehicle { AP_Param param_loader {var_info}; // dummy implementation of external control +#if AP_EXTERNAL_CONTROL_ENABLED AP_ExternalControl external_control; +#endif static const AP_Scheduler::Task scheduler_tasks[]; static const AP_Param::Info var_info[];