AP_RPM: add AP::rpm() call for singleton

This commit is contained in:
Peter Barker 2019-03-15 22:15:44 +11:00 committed by Randy Mackay
parent b1c789f73d
commit 7498972b8d
2 changed files with 12 additions and 0 deletions

View File

@ -182,3 +182,11 @@ bool AP_RPM::enabled(uint8_t instance) const
// singleton instance // singleton instance
AP_RPM *AP_RPM::_singleton; AP_RPM *AP_RPM::_singleton;
namespace AP {
AP_RPM *rpm()
{
return AP_RPM::get_singleton();
}
}

View File

@ -104,3 +104,7 @@ private:
void detect_instance(uint8_t instance); void detect_instance(uint8_t instance);
void update_instance(uint8_t instance); void update_instance(uint8_t instance);
}; };
namespace AP {
AP_RPM *rpm();
};