From 0c06bf89e5cd1d63b36854a87c2f2b49d563fc87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Fri, 15 Jun 2018 16:05:56 -0300 Subject: [PATCH] AP_InertialSensor: Use SITL singleton MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- libraries/AP_InertialSensor/AP_InertialSensor_SITL.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor_SITL.cpp b/libraries/AP_InertialSensor/AP_InertialSensor_SITL.cpp index f543f2d242..3d878a3bb9 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor_SITL.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor_SITL.cpp @@ -28,9 +28,9 @@ AP_InertialSensor_Backend *AP_InertialSensor_SITL::detect(AP_InertialSensor &_im return sensor; } -bool AP_InertialSensor_SITL::init_sensor(void) +bool AP_InertialSensor_SITL::init_sensor(void) { - sitl = (SITL::SITL *)AP_Param::find_object("SIM_"); + sitl = AP::sitl(); if (sitl == nullptr) { return false; }