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 0x77 // I2C address of BMP280 (can also be 0x76
14 /*=========================================================================
15 CALIBRATION DATA for BMP280
16 -----------------------------------------------------------------------*/
32 /*=========================================================================*/
37 OXS_BMP280( HardwareSerial
&print
);
49 uint8_t errorI2C
; //error code returned by I2C::Write and I2C::Read; 0 = no error
50 bool errorCalibration
; // (true = error)
51 void SendCommand(byte command
);
52 long getData(byte command
, byte del
);
53 void calculateVario() ;
63 int16_t alt_temp_compensation ;
65 int32_t altitude
; // in cm * 100
66 int32_t altitudeLowPass
;
67 int32_t altitudeHighPass
;
71 unsigned long extended2Micros
; // used to temporarilly save micros() >> 1
72 unsigned long pressureMicros
; // save time when program send command asking the MS5611 to get the pressure
73 unsigned long pressureMicrosPrev1
; // save the previous pressureMicros
74 unsigned long pressureMicrosPrev2
; // save the previous of the previous pressureMicros
75 unsigned long altMillis
;
76 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)
77 unsigned long nextAverageAltMillis
; // save when AverageAltitude has to be calculated
79 float climbRate2AltFloat
;
81 float abs_deltaClimbRate
;
84 HardwareSerial
* printer
;
86 }; // end class OXS_BMP280