1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00

Update Olimexo to support a 10DOF board.

Sensors on it are: MPU6050 HMC5883L BMP085.

BMP085 not connected to GPIO pins.
This commit is contained in:
Dominic Clifton 2014-06-08 12:28:38 +01:00
parent e17048a2f6
commit ad1b7dd216
4 changed files with 31 additions and 14 deletions

View file

@ -63,6 +63,8 @@
#define USE_ACC_MMA8452
#define USE_ACC_LSM303DLHC
#define USE_ACC_MPU6050
#define USE_BARO_MS5611
#define USE_BARO_BMP085
#ifdef NAZE
#undef USE_ACC_LSM303DLHC
@ -92,6 +94,7 @@
#undef USE_ACC_BMA280
#undef USE_ACC_MMA8452
#undef USE_ACC_ADXL345
#undef USE_BARO_MS5611
#endif
#ifdef CHEBUZZF3
@ -281,15 +284,21 @@ retry:
static void detectBaro()
{
#ifdef BARO
#ifdef USE_BARO_MS5611
// Detect what pressure sensors are available. baro->update() is set to sensor-specific update function
if (!ms5611Detect(&baro)) {
// ms5611 disables BMP085, and tries to initialize + check PROM crc. if this works, we have a baro
if (!bmp085Detect(&baro)) {
// if both failed, we don't have anything
sensorsClear(SENSOR_BARO);
}
if (ms5611Detect(&baro)) {
return;
}
#endif
#ifdef USE_BARO_BMP085
// ms5611 disables BMP085, and tries to initialize + check PROM crc. if this works, we have a baro
if (bmp085Detect(&baro)) {
return;
}
#endif
sensorsClear(SENSOR_BARO);
#endif
}
void reconfigureAlignment(sensorAlignmentConfig_t *sensorAlignmentConfig)