diff --git a/libraries/AP_RPM/AP_RPM.cpp b/libraries/AP_RPM/AP_RPM.cpp index 1ead3077cb..0aa96520b6 100644 --- a/libraries/AP_RPM/AP_RPM.cpp +++ b/libraries/AP_RPM/AP_RPM.cpp @@ -182,3 +182,11 @@ bool AP_RPM::enabled(uint8_t instance) const // singleton instance AP_RPM *AP_RPM::_singleton; +namespace AP { + +AP_RPM *rpm() +{ + return AP_RPM::get_singleton(); +} + +} diff --git a/libraries/AP_RPM/AP_RPM.h b/libraries/AP_RPM/AP_RPM.h index a473e63913..87e6693f9d 100644 --- a/libraries/AP_RPM/AP_RPM.h +++ b/libraries/AP_RPM/AP_RPM.h @@ -104,3 +104,7 @@ private: void detect_instance(uint8_t instance); void update_instance(uint8_t instance); }; + +namespace AP { + AP_RPM *rpm(); +};