1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 03:20:00 +03:00

Fix MAG redefines (#12882)

This commit is contained in:
Mark Haslinghuis 2023-06-14 05:36:53 +02:00 committed by GitHub
parent 2af7337204
commit 10aab0236a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,17 +86,37 @@
*/ */
#if defined(USE_MAG) && !defined(USE_VIRTUAL_MAG) #if defined(USE_MAG) && !defined(USE_VIRTUAL_MAG)
#ifndef USE_MAG_DATA_READY_SIGNAL
#define USE_MAG_DATA_READY_SIGNAL #define USE_MAG_DATA_READY_SIGNAL
#endif
#ifndef USE_MAG_HMC5883
#define USE_MAG_HMC5883 #define USE_MAG_HMC5883
#endif
#ifndef USE_MAG_SPI_HMC5883
#define USE_MAG_SPI_HMC5883 #define USE_MAG_SPI_HMC5883
#endif
#ifndef USE_MAG_QMC5883
#define USE_MAG_QMC5883 #define USE_MAG_QMC5883
#endif
#ifndef USE_MAG_LIS3MDL
#define USE_MAG_LIS3MDL #define USE_MAG_LIS3MDL
#endif
#ifndef USE_MAG_AK8963
#define USE_MAG_AK8963 #define USE_MAG_AK8963
#endif
#ifndef USE_MAG_MPU925X_AK8963
#define USE_MAG_MPU925X_AK8963 #define USE_MAG_MPU925X_AK8963
#endif
#ifndef USE_MAG_SPI_AK8963
#define USE_MAG_SPI_AK8963 #define USE_MAG_SPI_AK8963
#endif
#ifndef USE_MAG_AK8975
#define USE_MAG_AK8975 #define USE_MAG_AK8975
#endif #endif
#endif // END MAG HW defines
#if defined(USE_RX_CC2500) #if defined(USE_RX_CC2500)
#if !defined(USE_RX_SPI) #if !defined(USE_RX_SPI)
@ -368,12 +388,16 @@
// Generate USE_SPI_GYRO or USE_I2C_GYRO // Generate USE_SPI_GYRO or USE_I2C_GYRO
#if defined(USE_GYRO_L3G4200D) || defined(USE_GYRO_MPU3050) || defined(USE_GYRO_MPU6000) || defined(USE_GYRO_MPU6050) || defined(USE_GYRO_MPU6500) #if defined(USE_GYRO_L3G4200D) || defined(USE_GYRO_MPU3050) || defined(USE_GYRO_MPU6000) || defined(USE_GYRO_MPU6050) || defined(USE_GYRO_MPU6500)
#ifndef USE_I2C_GYRO
#define USE_I2C_GYRO #define USE_I2C_GYRO
#endif #endif
#endif
#if defined(USE_GYRO_SPI_ICM20689) || defined(USE_GYRO_SPI_MPU6000) || defined(USE_GYRO_SPI_MPU6500) || defined(USE_GYRO_SPI_MPU9250) || defined(USE_GYRO_L3GD20) || defined(USE_GYRO_SPI_ICM42605) || defined(USE_GYRO_SPI_ICM42688P) || defined(USE_ACCGYRO_BMI160) || defined(USE_ACCGYRO_BMI270) #if defined(USE_GYRO_SPI_ICM20689) || defined(USE_GYRO_SPI_MPU6000) || defined(USE_GYRO_SPI_MPU6500) || defined(USE_GYRO_SPI_MPU9250) || defined(USE_GYRO_L3GD20) || defined(USE_GYRO_SPI_ICM42605) || defined(USE_GYRO_SPI_ICM42688P) || defined(USE_ACCGYRO_BMI160) || defined(USE_ACCGYRO_BMI270)
#ifndef USE_SPI_GYRO
#define USE_SPI_GYRO #define USE_SPI_GYRO
#endif #endif
#endif
#ifndef SIMULATOR_BUILD #ifndef SIMULATOR_BUILD
#ifndef USE_ACC #ifndef USE_ACC