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:
parent
105910b25a
commit
637fd64f36
11 changed files with 26 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
#define BARO
|
||||
#define USE_BARO_MS5611
|
||||
#define USE_BARO_BMP085
|
||||
#define USE_BARO_BMP280
|
||||
|
||||
// External I2C MAG
|
||||
#define MAG
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
|
||||
#define BARO
|
||||
#define USE_BARO_MS5611
|
||||
#define USE_BARO_BMP280
|
||||
|
||||
#define MAG
|
||||
#define USE_MAG_AK8975
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
#define BARO
|
||||
#define USE_BARO_MS5611
|
||||
#define USE_BARO_BMP085
|
||||
#define USE_BARO_BMP280
|
||||
|
||||
#define MAG
|
||||
#define USE_MAG_HMC5883
|
||||
|
|
|
@ -107,6 +107,7 @@
|
|||
#define BARO
|
||||
#define USE_BARO_MS5611
|
||||
#define USE_BARO_BMP085
|
||||
#define USE_BARO_BMP280
|
||||
|
||||
#define MAG
|
||||
#define USE_MAG_HMC5883
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
#define BARO
|
||||
//#define USE_BARO_MS5611
|
||||
#define USE_BARO_BMP085
|
||||
#define USE_BARO_BMP280
|
||||
|
||||
#define MAG
|
||||
#define USE_MAG_HMC5883
|
||||
|
|
|
@ -88,6 +88,7 @@
|
|||
#define BARO
|
||||
#define USE_BARO_MS5611
|
||||
#define USE_BARO_BMP085
|
||||
#define USE_BARO_BMP280
|
||||
|
||||
#define MAG
|
||||
#define USE_MAG_HMC5883
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
#define BARO
|
||||
#define USE_BARO_MS5611
|
||||
#define USE_BARO_BMP280
|
||||
|
||||
#define MAG
|
||||
#define USE_MAG_AK8975
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
#define BARO
|
||||
#define USE_BARO_MS5611
|
||||
#define USE_BARO_BMP280
|
||||
|
||||
#define MAG
|
||||
#define USE_MAG_AK8975
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue