Browse Source

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

mission-4.1.18
Peter Barker 6 years ago committed by Randy Mackay
parent
commit
7498972b8d
  1. 8
      libraries/AP_RPM/AP_RPM.cpp
  2. 4
      libraries/AP_RPM/AP_RPM.h

8
libraries/AP_RPM/AP_RPM.cpp

@ -182,3 +182,11 @@ bool AP_RPM::enabled(uint8_t instance) const @@ -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();
}
}

4
libraries/AP_RPM/AP_RPM.h

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

Loading…
Cancel
Save