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

Resolution = Precision ? #74

Closed dusscloud closed 4 years ago

dusscloud commented 4 years ago

In order to change sensor resolution, the documentation refers to sensor.set_resolution() (Python case) w1thermsensor --resolution (CLI case)

But it does not work : the rights syntax seems to be sensor.set_precision() (Python case) w1thermsensor --precision (CLI case)

Side note : root is required for such resolution change, I think this may be written in the doc also.

timofurrer commented 4 years ago

But it does not work : the rights syntax seems to be

Depending on the version of w1thermsensor that's true.

The precision phrasing was changed to resolution in: https://github.com/timofurrer/w1thermsensor/commit/3e91314dc892e8177011405669f0f3ef254a9146. Because resolution is actually the correct term here.

You can use 1.3.0 from PyPI to have to change. (might be the case that an older version is deployed in rasbian apt sources)

Side note : root is required for such resolution change, I think this may be written in the doc also.

Yes, good catch! I've added this in: https://github.com/timofurrer/w1thermsensor/commit/519010e47e3e7441e05c221e1c6e1cc2f2a83252