aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/ds18b20.py
Commit message (Collapse)AuthorAgeFilesLines
* Run black on all first party python codeTomasz Kramkowski2025-08-061-17/+26
|
* ds18b20: fix string conversion error on startup (#5559)functionpointer2022-06-081-2/+3
| | | Signed-off-by: Lorenzo Pfeifer <Lorenzo.Pfeifer+github@googlemail.com>
* ds18b20: Don't propagate incorrect temperature on a faultKevin O'Connor2022-06-081-6/+4
| | | | | | | | | Just log an error on a fault. Remove the host check for min/max temperature as the micro-controller code already implements that check. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* ds18b20: Allow some read errorsfunctionpointer2022-06-081-2/+5
| | | | | | | | | | | | | | | | | | | | | Allows a limited number of DS18B20 read failures before stopping the printer. This is designed to tolerate spurious read errors, while still stopping for serious issues. The printer will stop when the sensor fails to report a value five times in a row. Implementation works as follows: The MCU reports any read errors using a new "fault" parameter in its answers. The Python code tracks the number of errors and triggers the shutdown. This paves the way for more sophisticated error handling in the future, as well as an example for other sensors to follow. Signed-off-by: Lorenzo Pfeifer <Lorenzo.Pfeifer+github@googlemail.com>
* ds18b20: round reported temps to 2 decimal placesEric Callahan2021-10-151-1/+1
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* ds18b20: Improve Python3 compatibilityKevin O'Connor2021-10-071-3/+4
| | | | | | Reported by @matthewlloyd. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* ds18b20: new module for 1-wire temperature sensor (#3462)Alan Lord2021-02-021-0/+77
Initial commit of code to support 1-wire (Dallas) sensors such as the DS18B20. Requires Linux kernel drivers to create a file in /sysfs which is read by this module, and temperature typically returned to a temperature_fan. Signed-off-by: Alan Lord <alanslists@gmail.com> Signed-off-by: Josh Headapohl <joshhead@gmail.com>