mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 04:45:24 +03:00
Setup I2C bus correctly for gyro detection
This commit is contained in:
parent
760300b562
commit
a33316c1f5
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue