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
|
@ -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…
Reference in New Issue