diff --git a/libraries/AP_WindVane/AP_WindVane_RPM.cpp b/libraries/AP_WindVane/AP_WindVane_RPM.cpp index a06ad5db3f..069f30b657 100644 --- a/libraries/AP_WindVane/AP_WindVane_RPM.cpp +++ b/libraries/AP_WindVane/AP_WindVane_RPM.cpp @@ -15,8 +15,11 @@ #include "AP_WindVane_RPM.h" +#include + void AP_WindVane_RPM::update_speed() { +#if AP_RPM_ENABLED const AP_RPM* rpm = AP_RPM::get_singleton(); if (rpm != nullptr) { float temp_speed; @@ -25,4 +28,5 @@ void AP_WindVane_RPM::update_speed() _frontend._speed_apparent_raw = temp_speed; } } +#endif // AP_RPM_ENABLED } diff --git a/libraries/AP_WindVane/AP_WindVane_RPM.h b/libraries/AP_WindVane/AP_WindVane_RPM.h index 2959fc31ec..3d2c9e2dfe 100644 --- a/libraries/AP_WindVane/AP_WindVane_RPM.h +++ b/libraries/AP_WindVane/AP_WindVane_RPM.h @@ -16,8 +16,6 @@ #include "AP_WindVane_Backend.h" -#include - class AP_WindVane_RPM : public AP_WindVane_Backend { public: