diff --git a/src/main/io/serial_cli.c b/src/main/io/serial_cli.c index 463ffb72d..56a3f037a 100644 --- a/src/main/io/serial_cli.c +++ b/src/main/io/serial_cli.c @@ -228,7 +228,7 @@ static const char * const sensorTypeNames[] = { static const char * const sensorHardwareNames[4][11] = { { "", "None", "MPU6050", "L3G4200D", "MPU3050", "L3GD20", "MPU6000", "MPU6500", "MPU9250", "FAKE", NULL }, - { "", "None", "ADXL345", "MPU6050", "MMA845x", "BMA280", "LSM303DLHC", "MPU6000", "MPU6500", "FAKE", NULL }, + { "", "None", "ADXL345", "MPU6050", "MMA845x", "BMA280", "LSM303DLHC", "MPU6000", "MPU6500", "MPU9250", "FAKE", NULL }, { "", "None", "BMP085", "MS5611", "BMP280", NULL }, { "", "None", "HMC5883", "AK8975", "AK8963", NULL } }; diff --git a/src/main/sensors/acceleration.h b/src/main/sensors/acceleration.h index dc98ae78e..62bf40582 100644 --- a/src/main/sensors/acceleration.h +++ b/src/main/sensors/acceleration.h @@ -20,15 +20,16 @@ // Type of accelerometer used/detected typedef enum { ACC_DEFAULT = 0, - ACC_NONE = 1, - ACC_ADXL345 = 2, - ACC_MPU6050 = 3, - ACC_MMA8452 = 4, - ACC_BMA280 = 5, - ACC_LSM303DLHC = 6, - ACC_MPU6000 = 7, - ACC_MPU6500 = 8, - ACC_FAKE = 9, + ACC_NONE, + ACC_ADXL345, + ACC_MPU6050, + ACC_MMA8452, + ACC_BMA280, + ACC_LSM303DLHC, + ACC_MPU6000, + ACC_MPU6500, + ACC_MPU9250, + ACC_FAKE, ACC_MAX = ACC_FAKE } accelerationSensor_e; diff --git a/src/main/sensors/initialisation.c b/src/main/sensors/initialisation.c index bb46059ac..2529a8c33 100755 --- a/src/main/sensors/initialisation.c +++ b/src/main/sensors/initialisation.c @@ -384,6 +384,20 @@ retry: } #endif ; // fallthrough + case ACC_MPU9250: +#ifdef USE_ACC_SPI_MPU9250 + + if (mpu9250SpiAccDetect(&acc)) + { + accHardware = ACC_MPU9250; +#ifdef ACC_MPU9250_ALIGN + accAlign = ACC_MPU9250_ALIGN; +#endif + + break; + } +#endif + ; // fallthrough case ACC_FAKE: #ifdef USE_FAKE_ACC if (fakeAccDetect(&acc)) {