1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 16:25:26 +03:00

Merge pull request #2951 from iNavFlight/de_radixfc

Bosch BMI160 gyro support + BrainFPV Radix
This commit is contained in:
Konstantin Sharlaimov 2018-05-13 20:03:22 +10:00 committed by GitHub
commit 5227273833
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 530 additions and 1 deletions

View file

@ -46,6 +46,7 @@
#include "drivers/accgyro/accgyro_adxl345.h"
#include "drivers/accgyro/accgyro_mma845x.h"
#include "drivers/accgyro/accgyro_bma280.h"
#include "drivers/accgyro/accgyro_bmi160.h"
#include "drivers/accgyro/accgyro_fake.h"
#include "drivers/logging.h"
#include "drivers/sensor.h"
@ -246,6 +247,22 @@ static bool accDetect(accDev_t *dev, accelerationSensor_e accHardwareToUse)
FALLTHROUGH;
#endif
#if defined(USE_ACC_BMI160)
case ACC_BMI160:
if (bmi160AccDetect(dev)) {
#ifdef ACC_BMI160_ALIGN
dev->accAlign = ACC_BMI160_ALIGN;
#endif
accHardware = ACC_BMI160;
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_FAKE_ACC
case ACC_FAKE:
if (fakeAccDetect(dev)) {