AP_Airspeed: add AP::airspeed() to get airspeed singleton

This commit is contained in:
Peter Barker 2019-04-06 12:10:17 +11:00 committed by Andrew Tridgell
parent 4ab13b37ac
commit 59ef486da0
2 changed files with 13 additions and 0 deletions

View File

@ -501,3 +501,12 @@ bool AP_Airspeed::all_healthy(void) const
// singleton instance
AP_Airspeed *AP_Airspeed::_singleton;
namespace AP {
AP_Airspeed *airspeed()
{
return AP_Airspeed::get_singleton();
}
};

View File

@ -248,3 +248,7 @@ private:
AP_Airspeed_Backend *sensor[AIRSPEED_MAX_SENSORS];
};
namespace AP {
AP_Airspeed *airspeed();
};