AP_Compass: unify singleton naming to _singleton and get_singleton()

This commit is contained in:
Tom Pittenger 2019-02-10 10:31:46 -08:00 committed by Tom Pittenger
parent 5d66c3ed62
commit 2cd485e7ae
2 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ AP_Compass_Backend *AP_Compass_AK8963::probe_mpu9250(AP_HAL::OwnPtr<AP_HAL::I2CD
if (!dev) { if (!dev) {
return nullptr; return nullptr;
} }
AP_InertialSensor &ins = *AP_InertialSensor::get_instance(); AP_InertialSensor &ins = *AP_InertialSensor::get_singleton();
/* Allow MPU9250 to shortcut auxiliary bus and host bus */ /* Allow MPU9250 to shortcut auxiliary bus and host bus */
ins.detect_backends(); ins.detect_backends();
@ -102,7 +102,7 @@ AP_Compass_Backend *AP_Compass_AK8963::probe_mpu9250(AP_HAL::OwnPtr<AP_HAL::I2CD
AP_Compass_Backend *AP_Compass_AK8963::probe_mpu9250(uint8_t mpu9250_instance, AP_Compass_Backend *AP_Compass_AK8963::probe_mpu9250(uint8_t mpu9250_instance,
enum Rotation rotation) enum Rotation rotation)
{ {
AP_InertialSensor &ins = *AP_InertialSensor::get_instance(); AP_InertialSensor &ins = *AP_InertialSensor::get_singleton();
AP_AK8963_BusDriver *bus = AP_AK8963_BusDriver *bus =
new AP_AK8963_BusDriver_Auxiliary(ins, HAL_INS_MPU9250_SPI, mpu9250_instance, AK8963_I2C_ADDR); new AP_AK8963_BusDriver_Auxiliary(ins, HAL_INS_MPU9250_SPI, mpu9250_instance, AK8963_I2C_ADDR);

View File

@ -130,7 +130,7 @@ AP_Compass_Backend *AP_Compass_HMC5843::probe(AP_HAL::OwnPtr<AP_HAL::Device> dev
AP_Compass_Backend *AP_Compass_HMC5843::probe_mpu6000(enum Rotation rotation) AP_Compass_Backend *AP_Compass_HMC5843::probe_mpu6000(enum Rotation rotation)
{ {
AP_InertialSensor &ins = *AP_InertialSensor::get_instance(); AP_InertialSensor &ins = *AP_InertialSensor::get_singleton();
AP_HMC5843_BusDriver *bus = AP_HMC5843_BusDriver *bus =
new AP_HMC5843_BusDriver_Auxiliary(ins, HAL_INS_MPU60XX_SPI, new AP_HMC5843_BusDriver_Auxiliary(ins, HAL_INS_MPU60XX_SPI,