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

Do call gyroPreInitsensor for gyro 2 even if it is not activated.

This commit is contained in:
jflyper 2018-12-17 02:07:50 +09:00
parent 8165039e4e
commit a27a374f41

View file

@ -495,13 +495,9 @@ static bool gyroInitSensor(gyroSensor_t *gyroSensor, const gyroDeviceConfig_t *c
void gyroPreInit(void)
{
if (gyroToUse == GYRO_CONFIG_USE_GYRO_1 || gyroToUse == GYRO_CONFIG_USE_GYRO_BOTH) {
gyroPreInitSensor(gyroDeviceConfig(0));
}
gyroPreInitSensor(gyroDeviceConfig(0));
#ifdef USE_MULTI_GYRO
if (gyroToUse == GYRO_CONFIG_USE_GYRO_2 || gyroToUse == GYRO_CONFIG_USE_GYRO_BOTH) {
gyroPreInitSensor(gyroDeviceConfig(1));
}
gyroPreInitSensor(gyroDeviceConfig(1));
#endif
}