AP_InertialSensor: require gyro orientations in LSM9DS probe

this prevents a bug where they are missing in hwdef.dat
This commit is contained in:
Andrew Tridgell 2019-08-27 18:16:15 +10:00
parent 291e2e3af6
commit c99923d500
3 changed files with 4 additions and 10 deletions

View File

@ -860,12 +860,6 @@ AP_InertialSensor::detect_backends(void)
#elif HAL_INS_DEFAULT == HAL_INS_EDGE
ADD_BACKEND(AP_InertialSensor_Invensense::probe(*this, hal.spi->get_device(HAL_INS_MPU60x0_NAME), ROTATION_YAW_90));
ADD_BACKEND(AP_InertialSensor_Invensense::probe(*this, hal.spi->get_device(HAL_INS_MPU60x0_NAME_EXT), ROTATION_YAW_90));
#elif HAL_INS_DEFAULT == HAL_INS_LSM9DS1
ADD_BACKEND(AP_InertialSensor_LSM9DS1::probe(*this, hal.spi->get_device(HAL_INS_LSM9DS1_NAME)));
#elif HAL_INS_DEFAULT == HAL_INS_LSM9DS0
ADD_BACKEND(AP_InertialSensor_LSM9DS0::probe(*this,
hal.spi->get_device(HAL_INS_LSM9DS0_G_NAME),
hal.spi->get_device(HAL_INS_LSM9DS0_A_NAME)));
#elif HAL_INS_DEFAULT == HAL_INS_L3G4200D
ADD_BACKEND(AP_InertialSensor_L3G4200D::probe(*this, hal.i2c_mgr->get_device(HAL_INS_L3G4200D_I2C_BUS, HAL_INS_L3G4200D_I2C_ADDR)));
#elif HAL_INS_DEFAULT == HAL_INS_MPU9250_I2C

View File

@ -18,9 +18,9 @@ public:
static AP_InertialSensor_Backend *probe(AP_InertialSensor &imu,
AP_HAL::OwnPtr<AP_HAL::Device> dev_gyro,
AP_HAL::OwnPtr<AP_HAL::Device> dev_accel,
enum Rotation rotation_a = ROTATION_NONE,
enum Rotation rotation_g = ROTATION_NONE,
enum Rotation rotation_gH = ROTATION_NONE);
enum Rotation rotation_a,
enum Rotation rotation_g,
enum Rotation rotation_gH);
private:
AP_InertialSensor_LSM9DS0(AP_InertialSensor &imu,

View File

@ -18,7 +18,7 @@ public:
static AP_InertialSensor_Backend *probe(AP_InertialSensor &imu,
AP_HAL::OwnPtr<AP_HAL::SPIDevice> dev,
enum Rotation rotation = ROTATION_NONE);
enum Rotation rotation);
private:
AP_InertialSensor_LSM9DS1(AP_InertialSensor &imu,
AP_HAL::OwnPtr<AP_HAL::SPIDevice> dev,