Function xensiv_pasco2_perform_forced_compensation(const xensiv_pasco2_t *, uint16_t)

Function Documentation

int32_t xensiv_pasco2_perform_forced_compensation(const xensiv_pasco2_t *dev, uint16_t co2_ref)

Performs force compensation. Used to calculate the offset compensation when the sensor is exposed to a CO2 reference value. The device is left is idle mode and the new offset compensation value is stored in non-volatile memory.

Parameters
  • dev[in] Pointer to the XENSIV™ PAS CO2 sensor device

  • cmd[in] Command to trigger

Returns

XENSIV_PASCO2_OK if the force compensation was successful; an error indicating what went wrong otherwise