Skip to content

Commit

Permalink
Add MPU6050
Browse files Browse the repository at this point in the history
  • Loading branch information
HKR1987 authored and sensei-hacker committed Oct 4, 2023
1 parent 1382ab6 commit e6038d0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1,678 deletions.
14 changes: 13 additions & 1 deletion src/main/sensors/acceleration.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "drivers/accgyro/accgyro.h"
#include "drivers/accgyro/accgyro_mpu.h"
#include "drivers/accgyro/accgyro_mpu6000.h"
#include "drivers/accgyro/accgyro_mpu6050.h"
#include "drivers/accgyro/accgyro_mpu6500.h"
#include "drivers/accgyro/accgyro_mpu9250.h"

Expand Down Expand Up @@ -130,7 +131,18 @@ static bool accDetect(accDev_t *dev, accelerationSensor_e accHardwareToUse)
switch (accHardwareToUse) {
case ACC_AUTODETECT:
FALLTHROUGH;

#ifdef USE_IMU_MPU6050
case ACC_MPU6050: // MPU6050
if (mpu6050AccDetect(dev)) {
accHardware = ACC_MPU6050;
break;
}
/* If we are asked for a specific sensor - break out, otherwise - fall through and continue */
if (accHardwareToUse != ACC_AUTODETECT) {
break;
}
FALLTHROUGH;
#endif
#ifdef USE_IMU_MPU6000
case ACC_MPU6000:
if (mpu6000AccDetect(dev)) {
Expand Down
Loading

0 comments on commit e6038d0

Please sign in to comment.