AP_Baro: Use SITL singleton

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2018-05-10 20:32:23 -03:00 committed by Francisco Ferreira
parent 819f08b7f7
commit 4ae6bd2c7e

View File

@ -11,10 +11,10 @@ extern const AP_HAL::HAL& hal;
constructor - registers instance at top Baro driver
*/
AP_Baro_SITL::AP_Baro_SITL(AP_Baro &baro) :
_sitl(AP::sitl()),
_has_sample(false),
AP_Baro_Backend(baro)
{
_sitl = (SITL::SITL *)AP_Param::find_object("SIM_");
if (_sitl != nullptr) {
_instance = _frontend.register_sensor();
#if APM_BUILD_TYPE(APM_BUILD_ArduSub)