1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Merge pull request #7549 from jflyper/bfdev-setup-bus-device-correctly-for-i2c-gyro-detection

[I2C, GYRO] Setup I2C bus correctly for gyro detection
This commit is contained in:
Michael Keller 2019-02-09 11:50:31 +13:00 committed by GitHub
commit 0c90b69e3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -278,6 +278,7 @@ void mpuDetect(gyroDev_t *gyro, const gyroDeviceConfig_t *config)
#ifdef USE_I2C_GYRO
if (gyro->bus.bustype == BUSTYPE_I2C) {
gyro->bus.busdev_u.i2c.device = I2C_CFG_TO_DEV(config->i2cBus);
gyro->bus.busdev_u.i2c.address = config->i2cAddress ? config->i2cAddress : MPU_ADDRESS;
uint8_t sig = 0;