4 #include "baro_spl06_regs.h"
6 class SPL06
: public BaroI2CBase
9 SPL06() : BaroI2CBase(), m_calib
{0} {}
11 // Detect if chip is present
16 uint8_t getPressureDuration();
18 uint32_t getPressure();
19 uint8_t getTemperatureDuration();
20 void startTemperature();
21 int32_t getTemperature();
23 // 32x Pressure + 8x Temperature = 70ms per update
24 // 4x=8.4ms/2.5PaRMS, 8x=14.8ms, 16x=27.6ms/1.2Pa, 32x=53.2ms/0.9Pa, 64x=104.4ms/0.5Pa
25 const uint8_t OVERSAMPLING_PRESSURE
= 32;
26 const uint8_t OVERSAMPLING_TEMPERATURE
= 8;
28 uint8_t oversampleToRegVal(const uint8_t oversamples
) const;
29 int32_t oversampleToScaleFactor(const uint8_t oversamples
) const;
30 float m_temperatureLast
; // last uncompensated temperature value
32 struct tagCalibrationData
43 } m_calib
; // calibration data, if initialized