AP_Compass: enable FMUv5 compass

This commit is contained in:
Andrew Tridgell 2018-05-30 08:30:33 +10:00
parent 77bb69fa2e
commit 99540a184c
1 changed files with 6 additions and 2 deletions

View File

@ -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),
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),
both_i2c_external, ROTATION_PITCH_180), AP_Compass_IST8310::name, both_i2c_external);
if (AP_BoardConfig::get_board_type() != 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),
both_i2c_external, ROTATION_PITCH_180), AP_Compass_IST8310::name, both_i2c_external);
}
#endif // HAL_MINIMIZE_FEATURES
}
break;
@ -732,6 +734,8 @@ void Compass::_detect_backends(void)
break;
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;
case AP_BoardConfig::PX4_BOARD_SP01: