Coefficients are not available immediately after power up and must only be read when COEF_RDY bit is set in MEAS_CFG register. Otherwise, if sensor is initialized too soon, the measurements are incorrect. Hence I exposed the read_calibration_coefficients() to the user and added an accompanying coef_ready().
Also fixed wrong mask for the init_complete() (although it happened to work due to additional mask in read_status()) and properly implemented lib-specific error handling by adding Error::InvalidMeasurementMode.
This needs a minor version bump, since user now has to call read_calibration_coefficients().
Coefficients are not available immediately after power up and must only be read when
COEF_RDY
bit is set inMEAS_CFG
register. Otherwise, if sensor is initialized too soon, the measurements are incorrect. Hence I exposed theread_calibration_coefficients()
to the user and added an accompanyingcoef_ready()
.Also fixed wrong mask for the
init_complete()
(although it happened to work due to additional mask inread_status()
) and properly implemented lib-specific error handling by addingError::InvalidMeasurementMode
.This needs a minor version bump, since user now has to call
read_calibration_coefficients()
.