mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +03:00
Merge pull request #10706 from hydra/bf-icm42688p-support
ICM42688-P Acc/Gyro sensor support
This commit is contained in:
commit
cdd1b76060
20 changed files with 353 additions and 309 deletions
|
@ -45,7 +45,7 @@
|
|||
#include "drivers/accgyro/accgyro_spi_icm20649.h"
|
||||
#include "drivers/accgyro/accgyro_spi_icm20689.h"
|
||||
#include "drivers/accgyro/accgyro_spi_icm20689.h"
|
||||
#include "drivers/accgyro/accgyro_spi_icm42605.h"
|
||||
#include "drivers/accgyro/accgyro_spi_icm426xx.h"
|
||||
#include "drivers/accgyro/accgyro_spi_lsm6dso.h"
|
||||
#include "drivers/accgyro/accgyro_spi_mpu6000.h"
|
||||
#include "drivers/accgyro/accgyro_spi_mpu6500.h"
|
||||
|
@ -439,10 +439,21 @@ STATIC_UNIT_TESTED gyroHardware_e gyroDetect(gyroDev_t *dev)
|
|||
FALLTHROUGH;
|
||||
#endif
|
||||
|
||||
#ifdef USE_GYRO_SPI_ICM42605
|
||||
#if defined(USE_GYRO_SPI_ICM42605) || defined(USE_GYRO_SPI_ICM42688P)
|
||||
case GYRO_ICM42605:
|
||||
if (icm42605SpiGyroDetect(dev)) {
|
||||
gyroHardware = GYRO_ICM42605;
|
||||
case GYRO_ICM42688P:
|
||||
if (icm426xxSpiGyroDetect(dev)) {
|
||||
switch (dev->mpuDetectionResult.sensor) {
|
||||
case ICM_42605_SPI:
|
||||
gyroHardware = GYRO_ICM42605;
|
||||
break;
|
||||
case ICM_42688P_SPI:
|
||||
gyroHardware = GYRO_ICM42688P;
|
||||
break;
|
||||
default:
|
||||
gyroHardware = GYRO_NONE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
FALLTHROUGH;
|
||||
|
@ -500,7 +511,7 @@ static bool gyroDetectSensor(gyroSensor_t *gyroSensor, const gyroDeviceConfig_t
|
|||
{
|
||||
#if defined(USE_GYRO_MPU6050) || defined(USE_GYRO_MPU3050) || defined(USE_GYRO_MPU6500) || defined(USE_GYRO_SPI_MPU6500) || defined(USE_GYRO_SPI_MPU6000) \
|
||||
|| defined(USE_ACC_MPU6050) || defined(USE_GYRO_SPI_MPU9250) || defined(USE_GYRO_SPI_ICM20601) || defined(USE_GYRO_SPI_ICM20649) \
|
||||
|| defined(USE_GYRO_SPI_ICM20689) || defined(USE_GYRO_L3GD20) || defined(USE_ACCGYRO_BMI160) || defined(USE_ACCGYRO_BMI270) || defined(USE_ACCGYRO_LSM6DSO) || defined(USE_GYRO_SPI_ICM42605)
|
||||
|| defined(USE_GYRO_SPI_ICM20689) || defined(USE_GYRO_L3GD20) || defined(USE_ACCGYRO_BMI160) || defined(USE_ACCGYRO_BMI270) || defined(USE_ACCGYRO_LSM6DSO) || defined(USE_GYRO_SPI_ICM42605) || defined(USE_GYRO_SPI_ICM42688P)
|
||||
|
||||
bool gyroFound = mpuDetect(&gyroSensor->gyroDev, config);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue