timofurrer / w1thermsensor

A Python package and CLI tool to work with w1 temperature sensors like DS1822, DS18S20 & DS18B20 on the Raspberry Pi, Beagle Bone and other devices.
MIT License
493 stars 113 forks source link

[Feature]: Temperature Correction/Calibration #118

Closed brettlounsbury closed 1 year ago

brettlounsbury commented 1 year ago

Description

It seems to me that most of the DS18B20 sensors I use need to be calibrated (I use this method). It would be awesome if the library could return a corrected value based on calibration data provided to it.

Would you be willing to accept a pull request where the library takes a calibration_data dict and if that data is provided, it returns corrected temperatures based on the calibration data instead of the raw values? Alternately, I could write a second method that returns the corrected temperatures based on that calibration data if you'd prefer that.

Guidelines

timofurrer commented 1 year ago

Yes, I think a new method makes sense and I'm totally open to a PR :)

brettlounsbury commented 1 year ago

@timofurrer - I submitted a PR here: https://github.com/timofurrer/w1thermsensor/pull/119

brettlounsbury commented 1 year ago

Code was merged

brettlounsbury commented 1 year ago

@timofurrer - do you have a timeline for releasing the newest version, at which point we can close this out?

brettlounsbury commented 1 year ago

Gentle nudge @timofurrer - can you cut a new release with the latest changes so that they can be consumed from pypi?

timofurrer commented 1 year ago

@brettlounsbury sorry that it took so long, release v2.3.0 just landed on PyPI: https://pypi.org/project/w1thermsensor/2.3.0