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 BMP180_ADR 0x77 // I2C address of BMP180
14 /*=========================================================================
15 CALIBRATION DATA for BMP180
16 -----------------------------------------------------------------------*/
31 /*=========================================================================*/
36 OXS_BMP180( HardwareSerial
&print
);
48 uint8_t errorI2C
; //error code returned by I2C::Write and I2C::Read; 0 = no error
49 bool errorCalibration
; // (true = error)
50 void SendCommand(byte command
);
51 long getData(byte command
, byte del
);
52 void calculateVario() ;
53 unsigned int low
, high
;
61 int16_t alt_temp_compensation
;
63 int32_t altitude
; // in cm * 100
64 int32_t altitudeLowPass
;
65 int32_t altitudeHighPass
;
69 unsigned long extended2Micros
; // used to temporarilly save micros() >> 1
70 unsigned long pressureMicros
; // save time when program send command asking the MS5611 to get the pressure
71 unsigned long pressureMicrosPrev1
; // save the previous pressureMicros
72 unsigned long pressureMicrosPrev2
; // save the previous of the previous pressureMicros
73 unsigned long altMillis
;
74 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)
75 unsigned long nextAverageAltMillis
; // save when AverageAltitude has to be calculated
77 float climbRate2AltFloat
;
78 float abs_deltaClimbRate
;
81 HardwareSerial
* printer
;
83 }; // end class OXS_MS5611