13 #ifndef ENS210_RESULT_HPP_INCLUDED 14 #define ENS210_RESULT_HPP_INCLUDED 33 float TempKelvin()
const;
34 int TempKelvinx10()
const {
return (10*((
unsigned int)rawTemperature))/64; };
35 float TempCelsius()
const;
36 int TempCelsiusX10()
const {
return TempKelvinx10() - (int)(273.15*10); };
37 float TempFahrenheit()
const;
38 int TempFahrenheitx10()
const;
40 int HumidityPercentX10()
const {
return (10*((
int)rawHumidity))/512; };
42 void DiagPrintf()
const;
float AbsoluteHumidityPercent() const
Fetch relative humidity % x10, ie 395 means 39.5% relative humidity.
Measurement result from ENS210.
uint16_t rawHumidity
relative humidity in 1/512RH (ie a value of 51200 means 100% relative humidity)
float HumidityPercent() const
Fetch relative humidity 0% to 100.0%.
The value was read, the CRC matches, and data is valid.
There was an I2C communication error attempting to read the value.
The value was read, the CRC matches, but the data is invalid (e.g. the measurement was not yet finish...
uint16_t rawTemperature
temperature in 1/64 Kelvin, corrected for solder offset
The value was read, but the CRC over the payload (valid and data) does not match. ...