4 #include "baro_bmp280_regs.h"
6 class BMP280
: public BaroI2CBase
9 BMP280() : BaroI2CBase(), m_calib
{0} {}
11 // Detect if chip is present
16 uint8_t getTemperatureDuration();
17 void startTemperature();
18 int32_t getTemperature();
19 // Temperature and Pressure are measured at the same time
20 uint8_t getPressureDuration() { return 0; }
21 void startPressure() {}
22 uint32_t getPressure();
25 // Filter 4: 1x=1.2PaRMS 2x=1.0PaRMS 4x=0.8PaRMS 8x=0.6PaRMS 16x=0.5PaRMS
26 // Filter 8: 1x=0.9PaRMS 2x=0.6PaRMS 4x=0.5PaRMS 8x=0.4PaRMS 16x=0.4PaRMS
27 // 16x pressure 1x Temp = 40.925ms
28 // 8x pressure 1x Temp = 22.525ms
29 static const uint8_t FILTER_COEFF
= BMP280_FILTER_COEFF_8
; // 8 in iNav
30 static const uint8_t OVERSAMPLING_PRESSURE
= BMP280_OVERSAMP_8X
; // 8x in iNav
31 static const uint8_t OVERSAMPLING_TEMPERATURE
= BMP280_OVERSAMP_1X
; // 1x in iNav
32 static const uint8_t FREERUNNING_NUM_SAMPLES
= 4; // Report after this number of samples complete
34 // calibration data, if initialized
35 // Packed to be able to read all at once
36 struct tagCalibrationData
50 } __attribute__((packed
)) m_calib
;
52 uint32_t m_pressureLast
;