AP_Baro: create AP::baro() function

This commit is contained in:
Peter Barker 2018-03-09 08:14:58 +11:00 committed by Lucas De Marchi
parent 5e1e3dc822
commit 0675f41d1e
2 changed files with 12 additions and 0 deletions

View File

@ -679,3 +679,11 @@ void AP_Baro::set_pressure_correction(uint8_t instance, float p_correction)
}
}
namespace AP {
AP_Baro &baro()
{
return *AP_Baro::get_instance();
}
};

View File

@ -219,3 +219,7 @@ private:
bool _add_backend(AP_Baro_Backend *backend);
};
namespace AP {
AP_Baro &baro();
};