mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Merge pull request #6985 from AlienWiiBF/GYRO_cleanup
Gryro configuration parameters cleanup
This commit is contained in:
commit
c677b1c19c
12 changed files with 42 additions and 131 deletions
|
@ -77,24 +77,6 @@ ioTag_t preinitIPUList[SPI_PREINIT_IPU_COUNT] = {
|
||||||
#ifdef GYRO_2_CS_PIN
|
#ifdef GYRO_2_CS_PIN
|
||||||
IO_TAG(GYRO_2_CS_PIN),
|
IO_TAG(GYRO_2_CS_PIN),
|
||||||
#endif
|
#endif
|
||||||
#ifdef MPU6000_CS_PIN
|
|
||||||
IO_TAG(MPU6000_CS_PIN),
|
|
||||||
#endif
|
|
||||||
#ifdef MPU6500_CS_PIN
|
|
||||||
IO_TAG(MPU6500_CS_PIN),
|
|
||||||
#endif
|
|
||||||
#ifdef MPU9250_CS_PIN
|
|
||||||
IO_TAG(MPU9250_CS_PIN),
|
|
||||||
#endif
|
|
||||||
#ifdef ICM20649_CS_PIN
|
|
||||||
IO_TAG(ICM20649_CS_PIN),
|
|
||||||
#endif
|
|
||||||
#ifdef ICM20689_CS_PIN
|
|
||||||
IO_TAG(ICM20689_CS_PIN),
|
|
||||||
#endif
|
|
||||||
#ifdef BMI160_CS_PIN
|
|
||||||
IO_TAG(BMI160_CS_PIN),
|
|
||||||
#endif
|
|
||||||
#ifdef L3GD20_CS_PIN
|
#ifdef L3GD20_CS_PIN
|
||||||
IO_TAG(L3GD20_CS_PIN),
|
IO_TAG(L3GD20_CS_PIN),
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -157,9 +157,6 @@ retry:
|
||||||
acc_params.useFifo = false;
|
acc_params.useFifo = false;
|
||||||
acc_params.dataRate = 800; // unused currently
|
acc_params.dataRate = 800; // unused currently
|
||||||
if (adxl345Detect(&acc_params, dev)) {
|
if (adxl345Detect(&acc_params, dev)) {
|
||||||
#ifdef ACC_ADXL345_ALIGN
|
|
||||||
dev->accAlign = ACC_ADXL345_ALIGN;
|
|
||||||
#endif
|
|
||||||
accHardware = ACC_ADXL345;
|
accHardware = ACC_ADXL345;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -169,9 +166,6 @@ retry:
|
||||||
#ifdef USE_ACC_LSM303DLHC
|
#ifdef USE_ACC_LSM303DLHC
|
||||||
case ACC_LSM303DLHC:
|
case ACC_LSM303DLHC:
|
||||||
if (lsm303dlhcAccDetect(dev)) {
|
if (lsm303dlhcAccDetect(dev)) {
|
||||||
#ifdef ACC_LSM303DLHC_ALIGN
|
|
||||||
dev->accAlign = ACC_LSM303DLHC_ALIGN;
|
|
||||||
#endif
|
|
||||||
accHardware = ACC_LSM303DLHC;
|
accHardware = ACC_LSM303DLHC;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -181,9 +175,6 @@ retry:
|
||||||
#ifdef USE_ACC_MPU6050
|
#ifdef USE_ACC_MPU6050
|
||||||
case ACC_MPU6050: // MPU6050
|
case ACC_MPU6050: // MPU6050
|
||||||
if (mpu6050AccDetect(dev)) {
|
if (mpu6050AccDetect(dev)) {
|
||||||
#ifdef ACC_MPU6050_ALIGN
|
|
||||||
dev->accAlign = ACC_MPU6050_ALIGN;
|
|
||||||
#endif
|
|
||||||
accHardware = ACC_MPU6050;
|
accHardware = ACC_MPU6050;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -193,9 +184,6 @@ retry:
|
||||||
#ifdef USE_ACC_MMA8452
|
#ifdef USE_ACC_MMA8452
|
||||||
case ACC_MMA8452: // MMA8452
|
case ACC_MMA8452: // MMA8452
|
||||||
if (mma8452Detect(dev)) {
|
if (mma8452Detect(dev)) {
|
||||||
#ifdef ACC_MMA8452_ALIGN
|
|
||||||
dev->accAlign = ACC_MMA8452_ALIGN;
|
|
||||||
#endif
|
|
||||||
accHardware = ACC_MMA8452;
|
accHardware = ACC_MMA8452;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -205,9 +193,6 @@ retry:
|
||||||
#ifdef USE_ACC_BMA280
|
#ifdef USE_ACC_BMA280
|
||||||
case ACC_BMA280: // BMA280
|
case ACC_BMA280: // BMA280
|
||||||
if (bma280Detect(dev)) {
|
if (bma280Detect(dev)) {
|
||||||
#ifdef ACC_BMA280_ALIGN
|
|
||||||
dev->accAlign = ACC_BMA280_ALIGN;
|
|
||||||
#endif
|
|
||||||
accHardware = ACC_BMA280;
|
accHardware = ACC_BMA280;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -217,9 +202,6 @@ retry:
|
||||||
#ifdef USE_ACC_SPI_MPU6000
|
#ifdef USE_ACC_SPI_MPU6000
|
||||||
case ACC_MPU6000:
|
case ACC_MPU6000:
|
||||||
if (mpu6000SpiAccDetect(dev)) {
|
if (mpu6000SpiAccDetect(dev)) {
|
||||||
#ifdef ACC_MPU6000_ALIGN
|
|
||||||
dev->accAlign = ACC_MPU6000_ALIGN;
|
|
||||||
#endif
|
|
||||||
accHardware = ACC_MPU6000;
|
accHardware = ACC_MPU6000;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -229,9 +211,6 @@ retry:
|
||||||
#ifdef USE_ACC_SPI_MPU9250
|
#ifdef USE_ACC_SPI_MPU9250
|
||||||
case ACC_MPU9250:
|
case ACC_MPU9250:
|
||||||
if (mpu9250SpiAccDetect(dev)) {
|
if (mpu9250SpiAccDetect(dev)) {
|
||||||
#ifdef ACC_MPU9250_ALIGN
|
|
||||||
dev->accAlign = ACC_MPU9250_ALIGN;
|
|
||||||
#endif
|
|
||||||
accHardware = ACC_MPU9250;
|
accHardware = ACC_MPU9250;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -247,9 +226,6 @@ retry:
|
||||||
if (mpu6500AccDetect(dev) || mpu6500SpiAccDetect(dev)) {
|
if (mpu6500AccDetect(dev) || mpu6500SpiAccDetect(dev)) {
|
||||||
#else
|
#else
|
||||||
if (mpu6500AccDetect(dev)) {
|
if (mpu6500AccDetect(dev)) {
|
||||||
#endif
|
|
||||||
#ifdef ACC_MPU6500_ALIGN
|
|
||||||
dev->accAlign = ACC_MPU6500_ALIGN;
|
|
||||||
#endif
|
#endif
|
||||||
switch (dev->mpuDetectionResult.sensor) {
|
switch (dev->mpuDetectionResult.sensor) {
|
||||||
case MPU_9250_SPI:
|
case MPU_9250_SPI:
|
||||||
|
@ -276,9 +252,6 @@ retry:
|
||||||
case ACC_ICM20649:
|
case ACC_ICM20649:
|
||||||
if (icm20649SpiAccDetect(dev)) {
|
if (icm20649SpiAccDetect(dev)) {
|
||||||
accHardware = ACC_ICM20649;
|
accHardware = ACC_ICM20649;
|
||||||
#ifdef ACC_ICM20649_ALIGN
|
|
||||||
dev->accAlign = ACC_ICM20649_ALIGN;
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
FALLTHROUGH;
|
FALLTHROUGH;
|
||||||
|
@ -288,9 +261,6 @@ retry:
|
||||||
case ACC_ICM20689:
|
case ACC_ICM20689:
|
||||||
if (icm20689SpiAccDetect(dev)) {
|
if (icm20689SpiAccDetect(dev)) {
|
||||||
accHardware = ACC_ICM20689;
|
accHardware = ACC_ICM20689;
|
||||||
#ifdef ACC_ICM20689_ALIGN
|
|
||||||
dev->accAlign = ACC_ICM20689_ALIGN;
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
FALLTHROUGH;
|
FALLTHROUGH;
|
||||||
|
@ -300,9 +270,6 @@ retry:
|
||||||
case ACC_BMI160:
|
case ACC_BMI160:
|
||||||
if (bmi160SpiAccDetect(dev)) {
|
if (bmi160SpiAccDetect(dev)) {
|
||||||
accHardware = ACC_BMI160;
|
accHardware = ACC_BMI160;
|
||||||
#ifdef ACC_BMI160_ALIGN
|
|
||||||
dev->accAlign = ACC_BMI160_ALIGN;
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
FALLTHROUGH;
|
FALLTHROUGH;
|
||||||
|
|
|
@ -49,14 +49,12 @@
|
||||||
#define USE_GYRO_MPU6050
|
#define USE_GYRO_MPU6050
|
||||||
#define USE_GYRO_SPI_MPU6500
|
#define USE_GYRO_SPI_MPU6500
|
||||||
|
|
||||||
#define GYRO_1_ALIGN CW270_DEG
|
|
||||||
#define GYRO_1_ALIGN CW270_DEG
|
#define GYRO_1_ALIGN CW270_DEG
|
||||||
|
|
||||||
#define USE_ACC
|
#define USE_ACC
|
||||||
#define USE_ACC_MPU6050
|
#define USE_ACC_MPU6050
|
||||||
#define USE_ACC_SPI_MPU6500
|
#define USE_ACC_SPI_MPU6500
|
||||||
|
|
||||||
#define ACC_1_ALIGN CW270_DEG
|
|
||||||
#define ACC_1_ALIGN CW270_DEG
|
#define ACC_1_ALIGN CW270_DEG
|
||||||
|
|
||||||
// No baro support.
|
// No baro support.
|
||||||
|
|
|
@ -46,25 +46,19 @@
|
||||||
|
|
||||||
#define USE_GYRO
|
#define USE_GYRO
|
||||||
#define USE_ACC
|
#define USE_ACC
|
||||||
//------ICM20689
|
#define GYRO_1_CS_PIN PA4
|
||||||
#define ICM20689_CS_PIN PA4
|
#define GYRO_1_SPI_INSTANCE SPI1
|
||||||
#define ICM20689_SPI_INSTANCE SPI1
|
|
||||||
|
|
||||||
#define USE_GYRO_SPI_ICM20689
|
|
||||||
#define GYRO_ICM20689_ALIGN CW90_DEG
|
|
||||||
|
|
||||||
#define USE_ACC_SPI_ICM20689
|
|
||||||
#define ACC_ICM20689_ALIGN CW90_DEG
|
|
||||||
//------MPU6000
|
|
||||||
#define GYRO_1_CS_PIN PA4
|
|
||||||
#define GYRO_1_SPI_INSTANCE SPI1
|
|
||||||
|
|
||||||
#define USE_GYRO_SPI_MPU6000
|
|
||||||
#define GYRO_1_ALIGN CW90_DEG
|
#define GYRO_1_ALIGN CW90_DEG
|
||||||
|
|
||||||
#define USE_ACC_SPI_MPU6000
|
|
||||||
#define ACC_1_ALIGN CW90_DEG
|
#define ACC_1_ALIGN CW90_DEG
|
||||||
|
|
||||||
|
//------ICM20689
|
||||||
|
#define USE_GYRO_SPI_ICM20689
|
||||||
|
#define USE_ACC_SPI_ICM20689
|
||||||
|
|
||||||
|
//------MPU6000
|
||||||
|
#define USE_GYRO_SPI_MPU6000
|
||||||
|
#define USE_ACC_SPI_MPU6000
|
||||||
|
|
||||||
//Baro & MAG-------------------------------
|
//Baro & MAG-------------------------------
|
||||||
#define USE_I2C
|
#define USE_I2C
|
||||||
#define USE_I2C_DEVICE_1
|
#define USE_I2C_DEVICE_1
|
||||||
|
|
|
@ -53,15 +53,11 @@
|
||||||
#define USE_ACC_SPI_MPU6000
|
#define USE_ACC_SPI_MPU6000
|
||||||
#define USE_ACC_SPI_MPU6500
|
#define USE_ACC_SPI_MPU6500
|
||||||
|
|
||||||
#define ACC_MPU6000_1_ALIGN CW180_DEG
|
#define GYRO_1_ALIGN CW180_DEG
|
||||||
#define GYRO_MPU6000_1_ALIGN CW180_DEG
|
#define ACC_1_ALIGN CW180_DEG
|
||||||
#define GYRO_1_ALIGN GYRO_MPU6000_1_ALIGN
|
|
||||||
#define ACC_1_ALIGN ACC_MPU6000_1_ALIGN
|
|
||||||
|
|
||||||
#define ACC_MPU6500_2_ALIGN CW0_DEG
|
#define GYRO_2_ALIGN CW0_DEG
|
||||||
#define GYRO_MPU6500_2_ALIGN CW0_DEG
|
#define ACC_2_ALIGN CW0_DEG
|
||||||
#define GYRO_2_ALIGN GYRO_MPU6500_2_ALIGN
|
|
||||||
#define ACC_2_ALIGN ACC_MPU6500_2_ALIGN
|
|
||||||
|
|
||||||
#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_1
|
#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_1
|
||||||
|
|
||||||
|
|
|
@ -46,25 +46,19 @@
|
||||||
|
|
||||||
#define USE_GYRO
|
#define USE_GYRO
|
||||||
#define USE_ACC
|
#define USE_ACC
|
||||||
//------ICM20689
|
#define GYRO_1_CS_PIN PB2
|
||||||
#define ICM20689_CS_PIN PB2
|
#define GYRO_1_SPI_INSTANCE SPI1
|
||||||
#define ICM20689_SPI_INSTANCE SPI1
|
|
||||||
|
|
||||||
#define USE_GYRO_SPI_ICM20689
|
|
||||||
#define GYRO_ICM20689_ALIGN CW90_DEG
|
|
||||||
|
|
||||||
#define USE_ACC_SPI_ICM20689
|
|
||||||
#define ACC_ICM20689_ALIGN CW90_DEG
|
|
||||||
//------MPU6000
|
|
||||||
#define GYRO_1_CS_PIN PB2
|
|
||||||
#define GYRO_1_SPI_INSTANCE SPI1
|
|
||||||
|
|
||||||
#define USE_GYRO_SPI_MPU6000
|
|
||||||
#define GYRO_1_ALIGN CW90_DEG
|
#define GYRO_1_ALIGN CW90_DEG
|
||||||
|
|
||||||
#define USE_ACC_SPI_MPU6000
|
|
||||||
#define ACC_1_ALIGN CW90_DEG
|
#define ACC_1_ALIGN CW90_DEG
|
||||||
|
|
||||||
|
//------ICM20689
|
||||||
|
#define USE_GYRO_SPI_ICM20689
|
||||||
|
#define USE_ACC_SPI_ICM20689
|
||||||
|
|
||||||
|
//------MPU6000
|
||||||
|
#define USE_GYRO_SPI_MPU6000
|
||||||
|
#define USE_ACC_SPI_MPU6000
|
||||||
|
|
||||||
//Baro & MAG-------------------------------
|
//Baro & MAG-------------------------------
|
||||||
#define USE_I2C
|
#define USE_I2C
|
||||||
#define USE_I2C_DEVICE_1
|
#define USE_I2C_DEVICE_1
|
||||||
|
|
|
@ -52,15 +52,11 @@
|
||||||
#define USE_ACC_SPI_MPU6000
|
#define USE_ACC_SPI_MPU6000
|
||||||
#define USE_ACC_SPI_MPU6500
|
#define USE_ACC_SPI_MPU6500
|
||||||
|
|
||||||
#define ACC_MPU6000_1_ALIGN CW270_DEG
|
#define GYRO_1_ALIGN CW270_DEG
|
||||||
#define GYRO_MPU6000_1_ALIGN CW270_DEG
|
#define ACC_1_ALIGN CW270_DEG
|
||||||
#define GYRO_1_ALIGN GYRO_MPU6000_1_ALIGN
|
|
||||||
#define ACC_1_ALIGN ACC_MPU6000_1_ALIGN
|
|
||||||
|
|
||||||
#define ACC_MPU6500_2_ALIGN CW180_DEG
|
#define GYRO_2_ALIGN CW180_DEG
|
||||||
#define GYRO_MPU6500_2_ALIGN CW180_DEG
|
#define ACC_2_ALIGN CW180_DEG
|
||||||
#define GYRO_2_ALIGN GYRO_MPU6500_2_ALIGN
|
|
||||||
#define ACC_2_ALIGN ACC_MPU6500_2_ALIGN
|
|
||||||
|
|
||||||
#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_1
|
#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_1
|
||||||
|
|
||||||
|
|
|
@ -64,23 +64,19 @@
|
||||||
|
|
||||||
#define GYRO_1_CS_PIN PC4
|
#define GYRO_1_CS_PIN PC4
|
||||||
#define GYRO_1_SPI_INSTANCE SPI1
|
#define GYRO_1_SPI_INSTANCE SPI1
|
||||||
|
#define ACC_1_ALIGN CW270_DEG
|
||||||
|
#define GYRO_1_ALIGN CW270_DEG
|
||||||
|
|
||||||
#define USE_ACC
|
#define USE_ACC
|
||||||
#define USE_ACC_SPI_ICM20689
|
#define USE_ACC_SPI_ICM20689
|
||||||
#define ACC_1_ALIGN CW270_DEG
|
|
||||||
|
|
||||||
#define USE_GYRO
|
#define USE_GYRO
|
||||||
#define USE_GYRO_SPI_ICM20689
|
#define USE_GYRO_SPI_ICM20689
|
||||||
#define GYRO_1_ALIGN CW270_DEG
|
|
||||||
|
|
||||||
#if defined(FLYWOOF405)
|
#if defined(FLYWOOF405)
|
||||||
//------MPU6000
|
//------MPU6000
|
||||||
#define MPU6000_CS_PIN PC4
|
|
||||||
#define MPU6000_SPI_INSTANCE SPI1
|
|
||||||
#define USE_GYRO_SPI_MPU6000
|
#define USE_GYRO_SPI_MPU6000
|
||||||
#define GYRO_MPU6000_ALIGN CW270_DEG
|
|
||||||
#define USE_ACC_SPI_MPU6000
|
#define USE_ACC_SPI_MPU6000
|
||||||
#define ACC_MPU6000_ALIGN CW270_DEG
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(KAKUTEF4V2) || defined(FLYWOOF405) // There is invertor on RXD3(PB11), so PB10/PB11 can't be used as I2C2.
|
#if defined(KAKUTEF4V2) || defined(FLYWOOF405) // There is invertor on RXD3(PB11), so PB10/PB11 can't be used as I2C2.
|
||||||
|
|
|
@ -91,23 +91,21 @@
|
||||||
#define GYRO_1_SPI_INSTANCE SPI1
|
#define GYRO_1_SPI_INSTANCE SPI1
|
||||||
|
|
||||||
#define USE_GYRO
|
#define USE_GYRO
|
||||||
|
#define GYRO_1_ALIGN CW270_DEG
|
||||||
#ifdef LUXV2_RACE
|
#ifdef LUXV2_RACE
|
||||||
#define USE_GYRO_SPI_MPU6000
|
#define USE_GYRO_SPI_MPU6000
|
||||||
#define GYRO_1_ALIGN CW270_DEG
|
|
||||||
#else
|
#else
|
||||||
#define USE_GYRO_SPI_MPU6500
|
#define USE_GYRO_SPI_MPU6500
|
||||||
#define GYRO_1_ALIGN CW270_DEG
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define USE_ACC
|
#define USE_ACC
|
||||||
|
#define ACC_1_ALIGN CW270_DEG
|
||||||
#ifdef LUXV2_RACE
|
#ifdef LUXV2_RACE
|
||||||
#define USE_ACC_MPU6000
|
#define USE_ACC_MPU6000
|
||||||
#define USE_ACC_SPI_MPU6000
|
#define USE_ACC_SPI_MPU6000
|
||||||
#define ACC_1_ALIGN CW270_DEG
|
|
||||||
#else
|
#else
|
||||||
#define USE_ACC_MPU6500
|
#define USE_ACC_MPU6500
|
||||||
#define USE_ACC_SPI_MPU6500
|
#define USE_ACC_SPI_MPU6500
|
||||||
#define ACC_1_ALIGN CW270_DEG
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define USE_VCP
|
#define USE_VCP
|
||||||
|
|
|
@ -44,9 +44,6 @@
|
||||||
#define GYRO_1_CS_PIN PC2
|
#define GYRO_1_CS_PIN PC2
|
||||||
#define GYRO_1_SPI_INSTANCE SPI1
|
#define GYRO_1_SPI_INSTANCE SPI1
|
||||||
|
|
||||||
#define ICM20689_CS_PIN PC2
|
|
||||||
#define ICM20689_SPI_INSTANCE SPI1
|
|
||||||
|
|
||||||
#define USE_EXTI
|
#define USE_EXTI
|
||||||
#define USE_GYRO_EXTI
|
#define USE_GYRO_EXTI
|
||||||
#define GYRO_1_EXTI_PIN PC3
|
#define GYRO_1_EXTI_PIN PC3
|
||||||
|
@ -56,13 +53,13 @@
|
||||||
#define USE_GYRO_SPI_MPU6500
|
#define USE_GYRO_SPI_MPU6500
|
||||||
#define USE_GYRO_SPI_ICM20689
|
#define USE_GYRO_SPI_ICM20689
|
||||||
#define GYRO_1_ALIGN CW180_DEG
|
#define GYRO_1_ALIGN CW180_DEG
|
||||||
//#define GYRO_ICM20689_ALIGN CW90_DEG // XXX has to be post-flash configured
|
//#define GYRO_1_ALIGN CW90_DEG // XXX has to be post-flash configured
|
||||||
|
|
||||||
#define USE_ACC
|
#define USE_ACC
|
||||||
#define USE_ACC_SPI_MPU6500
|
#define USE_ACC_SPI_MPU6500
|
||||||
#define USE_ACC_SPI_ICM20689
|
#define USE_ACC_SPI_ICM20689
|
||||||
#define ACC_1_ALIGN CW180_DEG
|
#define ACC_1_ALIGN CW180_DEG
|
||||||
//#define ACC_ICM20689_ALIGN CW90_DEG // XXX has to be post-flash configured
|
//#define ACC_1_ALIGN CW90_DEG // XXX has to be post-flash configured
|
||||||
|
|
||||||
// *************** Baro **************************
|
// *************** Baro **************************
|
||||||
#define USE_I2C
|
#define USE_I2C
|
||||||
|
|
|
@ -57,24 +57,19 @@
|
||||||
#define USE_ACC_SPI_MPU6500
|
#define USE_ACC_SPI_MPU6500
|
||||||
|
|
||||||
#if (SPRACINGF7DUAL_REV >= 2)
|
#if (SPRACINGF7DUAL_REV >= 2)
|
||||||
#define ACC_MPU6500_1_ALIGN CW0_DEG
|
#define GYRO_1_ALIGN CW0_DEG
|
||||||
#define GYRO_MPU6500_1_ALIGN CW0_DEG
|
#define ACC_1_ALIGN CW0_DEG
|
||||||
|
|
||||||
#define ACC_MPU6500_2_ALIGN CW270_DEG
|
#define GYRO_2_ALIGN CW270_DEG
|
||||||
#define GYRO_MPU6500_2_ALIGN CW270_DEG
|
#define ACC_2_ALIGN CW270_DEG
|
||||||
#else
|
#else
|
||||||
#define ACC_MPU6500_1_ALIGN CW180_DEG
|
#define GYRO_1_ALIGN CW180_DEG
|
||||||
#define GYRO_MPU6500_1_ALIGN CW180_DEG
|
#define ACC_1_ALIGN CW180_DEG
|
||||||
|
|
||||||
#define ACC_MPU6500_2_ALIGN CW270_DEG
|
#define GYRO_2_ALIGN CW270_DEG
|
||||||
#define GYRO_MPU6500_2_ALIGN CW270_DEG
|
#define ACC_2_ALIGN CW270_DEG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GYRO_1_ALIGN GYRO_MPU6500_1_ALIGN
|
|
||||||
#define GYRO_2_ALIGN GYRO_MPU6500_2_ALIGN
|
|
||||||
#define ACC_1_ALIGN ACC_MPU6500_1_ALIGN
|
|
||||||
#define ACC_2_ALIGN ACC_MPU6500_2_ALIGN
|
|
||||||
|
|
||||||
#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH
|
#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH
|
||||||
|
|
||||||
#define USE_BARO
|
#define USE_BARO
|
||||||
|
|
|
@ -122,8 +122,6 @@
|
||||||
#define GYRO_1_ALIGN CW0_DEG
|
#define GYRO_1_ALIGN CW0_DEG
|
||||||
#define USE_ACCGYRO_BMI160
|
#define USE_ACCGYRO_BMI160
|
||||||
#ifdef USE_ACCGYRO_BMI160
|
#ifdef USE_ACCGYRO_BMI160
|
||||||
#define BMI160_CS_PIN SPI2_NSS_PIN
|
|
||||||
#define BMI160_SPI_INSTANCE SPI2
|
|
||||||
#define BMI160_SPI_DIVISOR 16
|
#define BMI160_SPI_DIVISOR 16
|
||||||
#define USE_EXTI
|
#define USE_EXTI
|
||||||
#define USE_GYRO_EXTI
|
#define USE_GYRO_EXTI
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue