From e4566559329c28a7ee626f50b43f1a8ba2adc093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Thu, 10 May 2018 20:32:52 -0300 Subject: [PATCH] AP_Compass: 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_Compass/AP_Compass_SITL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Compass/AP_Compass_SITL.cpp b/libraries/AP_Compass/AP_Compass_SITL.cpp index 76e140c9ea..f8a0e4d2f9 100644 --- a/libraries/AP_Compass/AP_Compass_SITL.cpp +++ b/libraries/AP_Compass/AP_Compass_SITL.cpp @@ -6,10 +6,10 @@ extern const AP_HAL::HAL& hal; AP_Compass_SITL::AP_Compass_SITL(Compass &compass): + _sitl(AP::sitl()), _has_sample(false), AP_Compass_Backend(compass) { - _sitl = (SITL::SITL *)AP_Param::find_object("SIM_"); if (_sitl != nullptr) { _compass._setup_earth_field(); for (uint8_t i=0; i