1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 04:45:24 +03:00

Add support for new BMP280 barometer, modified files

This commit is contained in:
Richard Lehey 2015-06-02 01:53:05 +09:00 committed by borisbstyle
parent 105910b25a
commit 637fd64f36
11 changed files with 26 additions and 1 deletions

View file

@ -21,7 +21,8 @@ typedef enum {
BARO_NONE = 0,
BARO_DEFAULT = 1,
BARO_BMP085 = 2,
BARO_MS5611 = 3
BARO_MS5611 = 3,
BARO_BMP280 = 4
} baroSensor_e;
#define BARO_SAMPLE_COUNT_MAX 48

View file

@ -42,6 +42,7 @@
#include "drivers/barometer.h"
#include "drivers/barometer_bmp085.h"
#include "drivers/barometer_bmp280.h"
#include "drivers/barometer_ms5611.h"
#include "drivers/compass.h"
@ -456,6 +457,14 @@ static void detectBaro()
baroHardware = BARO_BMP085;
break;
}
#endif
; // fallthough
case BARO_BMP280:
#ifdef USE_BARO_BMP280
if (bmp280Detect(&baro)) {
baroHardware = BARO_BMP280;
break;
}
#endif
case BARO_NONE:
baroHardware = BARO_NONE;

View file

@ -58,6 +58,7 @@
#define BARO
#define USE_BARO_MS5611
#define USE_BARO_BMP085
#define USE_BARO_BMP280
// External I2C MAG
#define MAG

View file

@ -58,6 +58,7 @@
#define BARO
#define USE_BARO_MS5611
#define USE_BARO_BMP280
#define MAG
#define USE_MAG_AK8975

View file

@ -65,6 +65,7 @@
#define BARO
#define USE_BARO_MS5611
#define USE_BARO_BMP085
#define USE_BARO_BMP280
#define MAG
#define USE_MAG_HMC5883

View file

@ -107,6 +107,7 @@
#define BARO
#define USE_BARO_MS5611
#define USE_BARO_BMP085
#define USE_BARO_BMP280
#define MAG
#define USE_MAG_HMC5883

View file

@ -59,6 +59,7 @@
#define BARO
//#define USE_BARO_MS5611
#define USE_BARO_BMP085
#define USE_BARO_BMP280
#define MAG
#define USE_MAG_HMC5883

View file

@ -88,6 +88,7 @@
#define BARO
#define USE_BARO_MS5611
#define USE_BARO_BMP085
#define USE_BARO_BMP280
#define MAG
#define USE_MAG_HMC5883

View file

@ -41,6 +41,7 @@
#define BARO
#define USE_BARO_MS5611
#define USE_BARO_BMP280
#define MAG
#define USE_MAG_AK8975

View file

@ -49,6 +49,7 @@
#define BARO
#define USE_BARO_MS5611
#define USE_BARO_BMP280
#define MAG
#define USE_MAG_AK8975