AP_Proximity: add AP::proximity() singleton getter

This commit is contained in:
Peter Barker 2019-05-22 16:02:11 +10:00 committed by Tom Pittenger
parent 8ce4f73550
commit b086b39f89
2 changed files with 13 additions and 0 deletions

View File

@ -465,3 +465,12 @@ bool AP_Proximity::sensor_failed() const
}
AP_Proximity *AP_Proximity::_singleton;
namespace AP {
AP_Proximity *proximity()
{
return AP_Proximity::get_singleton();
}
}

View File

@ -161,3 +161,7 @@ private:
void detect_instance(uint8_t instance);
void update_instance(uint8_t instance);
};
namespace AP {
AP_Proximity *proximity();
};