mirror of https://github.com/ArduPilot/ardupilot
AP_Compass: enable FMUv5 compass
This commit is contained in:
parent
77bb69fa2e
commit
99540a184c
|
@ -666,8 +666,10 @@ void Compass::_detect_backends(void)
|
||||||
ADD_BACKEND(DRIVER_IST8310, AP_Compass_IST8310::probe(*this, hal.i2c_mgr->get_device(1, HAL_COMPASS_IST8310_I2C_ADDR),
|
ADD_BACKEND(DRIVER_IST8310, AP_Compass_IST8310::probe(*this, hal.i2c_mgr->get_device(1, HAL_COMPASS_IST8310_I2C_ADDR),
|
||||||
true, ROTATION_PITCH_180), AP_Compass_IST8310::name, true);
|
true, ROTATION_PITCH_180), AP_Compass_IST8310::name, true);
|
||||||
|
|
||||||
ADD_BACKEND(DRIVER_IST8310, AP_Compass_IST8310::probe(*this, hal.i2c_mgr->get_device(0, HAL_COMPASS_IST8310_I2C_ADDR),
|
if (AP_BoardConfig::get_board_type() != AP_BoardConfig::PX4_BOARD_FMUV5) {
|
||||||
both_i2c_external, ROTATION_PITCH_180), AP_Compass_IST8310::name, both_i2c_external);
|
ADD_BACKEND(DRIVER_IST8310, AP_Compass_IST8310::probe(*this, hal.i2c_mgr->get_device(0, HAL_COMPASS_IST8310_I2C_ADDR),
|
||||||
|
both_i2c_external, ROTATION_PITCH_180), AP_Compass_IST8310::name, both_i2c_external);
|
||||||
|
}
|
||||||
#endif // HAL_MINIMIZE_FEATURES
|
#endif // HAL_MINIMIZE_FEATURES
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -732,6 +734,8 @@ void Compass::_detect_backends(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AP_BoardConfig::PX4_BOARD_FMUV5:
|
case AP_BoardConfig::PX4_BOARD_FMUV5:
|
||||||
|
ADD_BACKEND(DRIVER_IST8310, AP_Compass_IST8310::probe(*this, hal.i2c_mgr->get_device(0, HAL_COMPASS_IST8310_I2C_ADDR),
|
||||||
|
false, ROTATION_ROLL_180_YAW_90), AP_Compass_IST8310::name, false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AP_BoardConfig::PX4_BOARD_SP01:
|
case AP_BoardConfig::PX4_BOARD_SP01:
|
||||||
|
|
Loading…
Reference in New Issue