Function xensiv_pas_gas_set_pressure_compensation(const xensiv_pas_gas_t *, uint16_t)

Function Documentation

int32_t xensiv_pas_gas_set_pressure_compensation(const xensiv_pas_gas_t *dev, uint16_t val)

Sets the pressure compensation value. The GAS 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 GAS concentration value before storing it into the result registers, and can be retrieved using xensiv_pas_gas_get_result.

Parameters:
  • dev[in] Pointer to a XENSIV™ PAS GAS sensor device

  • val[in] New pressure compensation value to apply

Returns:

XENSIV_PAS_GAS_OK if setting the pressure reference value was successful; an error indicating what went wrong otherwise