Context
Part of the temperature calibration harmonization (#103).
The WSEN-HIDS has factory calibration (two-point linear interpolation from calibration registers). The ~6°C discrepancy previously observed was caused by a bug (missing AUTO_INCREMENT bit, fixed in #109). With the fix, the sensor reads correctly (~31°C, matching HTS221).
A two-point software calibration mechanism is needed for per-board fine-tuning, consistent with the harmonized interface defined in #103.
TODO
Related
Context
Part of the temperature calibration harmonization (#103).
The WSEN-HIDS has factory calibration (two-point linear interpolation from calibration registers). The ~6°C discrepancy previously observed was caused by a bug (missing AUTO_INCREMENT bit, fixed in #109). With the fix, the sensor reads correctly (~31°C, matching HTS221).
A two-point software calibration mechanism is needed for per-board fine-tuning, consistent with the harmonized interface defined in #103.
TODO
self._temp_gain = 1.0andself._temp_offset = 0.0in__init__set_temp_offset(self, offset_c)method (simple offset, gain=1.0)calibrate_temperature(self, ref_low, measured_low, ref_high, measured_high)method_convert_temperature():return self._temp_gain * computed + self._temp_offsetRelated