mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
Better representation of actual sensor (when using 6500 compatible sensors).
This commit is contained in:
parent
df375ea4dd
commit
102114758c
9 changed files with 96 additions and 62 deletions
|
@ -169,6 +169,9 @@ retry:
|
|||
#endif
|
||||
; // fallthrough
|
||||
case ACC_MPU6500:
|
||||
case ACC_ICM20608G:
|
||||
case ACC_ICM20602:
|
||||
case ACC_MPU9250:
|
||||
#if defined(USE_ACC_MPU6500) || defined(USE_ACC_SPI_MPU6500)
|
||||
#ifdef USE_ACC_SPI_MPU6500
|
||||
if (mpu6500AccDetect(dev) || mpu6500SpiAccDetect(dev))
|
||||
|
@ -179,7 +182,19 @@ retry:
|
|||
#ifdef ACC_MPU6500_ALIGN
|
||||
dev->accAlign = ACC_MPU6500_ALIGN;
|
||||
#endif
|
||||
accHardware = ACC_MPU6500;
|
||||
switch(dev->mpuDetectionResult.sensor) {
|
||||
case MPU_9250_SPI:
|
||||
accHardware = ACC_MPU9250;
|
||||
break;
|
||||
case ICM_20608_SPI:
|
||||
accHardware = ACC_ICM20608G;
|
||||
break;
|
||||
case ICM_20602_SPI:
|
||||
accHardware = ACC_ICM20602;
|
||||
break;
|
||||
default:
|
||||
accHardware = ACC_MPU6500;
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue