Function xensiv_pasco2_set_pressure_compensation(const xensiv_pasco2_t *, uint16_t)¶
Defined in File xensiv_pasco2.h
Function Documentation¶
-
int32_t xensiv_pasco2_set_pressure_compensation(const xensiv_pasco2_t *dev, uint16_t val)¶
Sets the pressure compensation value. The CO2 concentration value acquired by the sensor is dependent on the external atmospheric pressure. To compensate for this effect, the application can provide the value of the atmospheric pressure using this function. At the end of a measurement sequence, the device reads the pressure value and applies it for compensation on the CO2 concentration value before storing it into the result registers, and can be retrieved using xensiv_pasco2_get_result.
- Parameters
dev – [in] Pointer to a XENSIV™ PAS CO2 sensor device
val – [in] New pressure compensation value to apply
- Returns
XENSIV_PASCO2_OK if setting the pressure reference value was successful; an error indicating what went wrong otherwise