AP_Compass: added SITL device IDs
This commit is contained in:
parent
464dc9102f
commit
823c4523b3
@ -61,8 +61,9 @@ public:
|
||||
DEVTYPE_IST8310 = 0x0A,
|
||||
DEVTYPE_ICM20948 = 0x0B,
|
||||
DEVTYPE_MMC3416 = 0x0C,
|
||||
DEVTYPE_QMC5883L = 0x0D,
|
||||
DEVTYPE_MAG3110 = 0x0E,
|
||||
DEVTYPE_QMC5883L = 0x0D,
|
||||
DEVTYPE_MAG3110 = 0x0E,
|
||||
DEVTYPE_SITL = 0x0F,
|
||||
};
|
||||
|
||||
|
||||
|
@ -14,6 +14,7 @@ AP_Compass_SITL::AP_Compass_SITL(Compass &compass):
|
||||
_compass._setup_earth_field();
|
||||
for (uint8_t i=0; i<SITL_NUM_COMPASSES; i++) {
|
||||
_compass_instance[i] = register_compass();
|
||||
set_dev_id(_compass_instance[i], AP_HAL::Device::make_bus_id(AP_HAL::Device::BUS_TYPE_SITL, i, 0, DEVTYPE_SITL));
|
||||
}
|
||||
hal.scheduler->register_timer_process(FUNCTOR_BIND(this, &AP_Compass_SITL::_timer, void));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user