aboutsummaryrefslogtreecommitdiffstats
path: root/src/linux/sensor_ds18b20.c
Commit message (Collapse)AuthorAgeFilesLines
* ds18b20: Allow some read errorsfunctionpointer2022-06-081-22/+33
| | | | | | | | | | | | | | | | | | | | | 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>
* linux: Use Unix signals to notify when a timer is pendingKevin O'Connor2021-11-021-0/+2
| | | | | | | Use Unix signals in software timer implementation. This makes the code a little more efficient. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* ds18b20: Segmentation fault on 64bit Raspberry PiEvgeny Chukreev2021-03-191-1/+1
| | | | Signed-off-by: Evgeny Chukreev <Evgeny.Chukreev@gmail.com>
* ds18b20: new module for 1-wire temperature sensor (#3462)Alan Lord2021-02-021-0/+274
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>