Silence unused-variable warning (#2872)
[ExpressLRS.git] / src / lib / Baro / baro_bmp085.h
blobd77ab91df455db95cd31129650add462280d58cd
1 #if 0
2 // BRY: I implemented this entire unit thinking I had a BMP085 on hand
3 // but I do not so this code is completely untested and never has run
4 // but it compiles, so ship it!
5 #pragma once
7 #include "baro_base.h"
8 #include "baro_bmp085_regs.h"
10 class BMP085 : public BaroI2CBase
12 public:
13 // Detect if chip is present
14 static bool detect();
16 // BaroBase methods
17 void initialize();
18 uint8_t getPressureDuration();
19 void startPressure();
20 uint32_t getPressure();
21 uint8_t getTemperatureDuration();
22 void startTemperature();
23 int32_t getTemperature();
25 protected:
26 // 3x pressure + temperature = 30.5ms per update
27 // 0x=4.5ms, 1x=7.5ms, 2x=13.5ms, 3x=25.5ms
28 // +3 +9 +21
29 const uint8_t OVERSAMPLING_PRESSURE = 3;
31 // calibration data, if initialized
32 // Packed to be able to read all at once
33 struct tagCalibrationData
35 int16_t ac1;
36 int16_t ac2;
37 int16_t ac3;
38 uint16_t ac4;
39 uint16_t ac5;
40 uint16_t ac6;
41 int16_t b1;
42 int16_t b2;
43 int16_t mb;
44 int16_t mc;
45 int16_t md;
46 } __attribute__((packed)) m_calib;
48 uint16_t m_temperatureLast;
50 private:
51 int32_t computeB5(int32_t UT) const;
53 #endif