mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 20:10:18 +03:00
Merge pull request #7227 from jflyper/bfdev-fix-gyro-detection-on-multi-gyro-boards-with-shared-SPI-bus
Do call gyroPreInitsensor for gyro 2 even if it is not activated
This commit is contained in:
commit
dd7a77e46c
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)
|
||||
{
|
||||
if (gyroToUse == GYRO_CONFIG_USE_GYRO_1 || gyroToUse == GYRO_CONFIG_USE_GYRO_BOTH) {
|
||||
gyroPreInitSensor(gyroDeviceConfig(0));
|
||||
}
|
||||
#ifdef USE_MULTI_GYRO
|
||||
if (gyroToUse == GYRO_CONFIG_USE_GYRO_2 || gyroToUse == GYRO_CONFIG_USE_GYRO_BOTH) {
|
||||
gyroPreInitSensor(gyroDeviceConfig(1));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue