mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
Do call gyroPreInitsensor for gyro 2 even if it is not activated.
This commit is contained in:
parent
8165039e4e
commit
a27a374f41
1 changed files with 2 additions and 6 deletions
|
@ -495,13 +495,9 @@ static bool gyroInitSensor(gyroSensor_t *gyroSensor, const gyroDeviceConfig_t *c
|
||||||
|
|
||||||
void gyroPreInit(void)
|
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
|
#ifdef USE_MULTI_GYRO
|
||||||
if (gyroToUse == GYRO_CONFIG_USE_GYRO_2 || gyroToUse == GYRO_CONFIG_USE_GYRO_BOTH) {
|
|
||||||
gyroPreInitSensor(gyroDeviceConfig(1));
|
gyroPreInitSensor(gyroDeviceConfig(1));
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue