AP_Compass: 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:52 -03:00 committed by Francisco Ferreira
parent 37fbd6aaa1
commit e456655932
1 changed files with 1 additions and 1 deletions

View File

@ -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<SITL_NUM_COMPASSES; i++) {