Allow resorting to fake gyro if USE_FAKE_GYRO is defined
This commit is contained in:
parent
f4bb75180e
commit
a78238e0f2
|
@ -416,9 +416,13 @@ static bool gyroDetectSensor(gyroSensor_t *gyroSensor, const gyroDeviceConfig_t
|
|||
#if defined(USE_GYRO_MPU6050) || defined(USE_GYRO_MPU3050) || defined(USE_GYRO_MPU6500) || defined(USE_GYRO_SPI_MPU6500) || defined(USE_GYRO_SPI_MPU6000) \
|
||||
|| defined(USE_ACC_MPU6050) || defined(USE_GYRO_SPI_MPU9250) || defined(USE_GYRO_SPI_ICM20601) || defined(USE_GYRO_SPI_ICM20649) || defined(USE_GYRO_SPI_ICM20689) || defined(USE_GYRO_L3GD20)
|
||||
|
||||
if (!mpuDetect(&gyroSensor->gyroDev, config)) {
|
||||
bool gyroFound = mpuDetect(&gyroSensor->gyroDev, config);
|
||||
|
||||
#if !defined(USE_FAKE_GYRO) // Allow resorting to fake accgyro if defined
|
||||
if (!gyroFound) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
UNUSED(config);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue