diff --git a/libraries/AP_Airspeed/AP_Airspeed.cpp b/libraries/AP_Airspeed/AP_Airspeed.cpp index bd7d02a826..3ca373efc9 100644 --- a/libraries/AP_Airspeed/AP_Airspeed.cpp +++ b/libraries/AP_Airspeed/AP_Airspeed.cpp @@ -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(); +} + +}; diff --git a/libraries/AP_Airspeed/AP_Airspeed.h b/libraries/AP_Airspeed/AP_Airspeed.h index 2bb695f5a8..71ee23cd43 100644 --- a/libraries/AP_Airspeed/AP_Airspeed.h +++ b/libraries/AP_Airspeed/AP_Airspeed.h @@ -248,3 +248,7 @@ private: AP_Airspeed_Backend *sensor[AIRSPEED_MAX_SENSORS]; }; + +namespace AP { + AP_Airspeed *airspeed(); +};