6 #include "oXs_config_basic.h"
7 #include "oXs_config_advanced.h"
8 #include "oXs_config_macros.h"
10 #include "oXs_ms5611.h"
12 #define BMP280_ADR 0x76 // I2C address of BMP280 (can also be 0x76
15 /*=========================================================================
16 CALIBRATION DATA for BMP280
17 -----------------------------------------------------------------------*/
33 /*=========================================================================*/
38 OXS_BMP280( HardwareSerial
&print
);
50 uint8_t errorI2C
; //error code returned by I2C::Write and I2C::Read; 0 = no error
51 bool errorCalibration
; // (true = error)
52 void SendCommand(byte command
);
53 long getData(byte command
, byte del
);
54 void calculateVario() ;
64 int16_t alt_temp_compensation ;
66 int32_t altitude
; // in cm * 100
67 int32_t altitudeLowPass
;
68 int32_t altitudeHighPass
;
72 unsigned long extended2Micros
; // used to temporarilly save micros() >> 1
73 unsigned long pressureMicros
; // save time when program send command asking the MS5611 to get the pressure
74 unsigned long pressureMicrosPrev1
; // save the previous pressureMicros
75 unsigned long pressureMicrosPrev2
; // save the previous of the previous pressureMicros
76 unsigned long altMillis
;
77 unsigned long nextAltMillis
; // save when Altitude has to be calculated; altitude is available only after 3200 in order to get a stable value (less temperature drift)
78 unsigned long nextAverageAltMillis
; // save when AverageAltitude has to be calculated
80 float climbRate2AltFloat
;
82 float abs_deltaClimbRate
;
85 HardwareSerial
* printer
;
87 }; // end class OXS_BMP280