aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/heaters.py
Commit message (Collapse)AuthorAgeFilesLines
* Isort all klippy codeTomasz Kramkowski2025-08-151-2/+3
|
* Run black on all first party python codeTomasz Kramkowski2025-08-061-103/+172
|
* heaters: Increase time before clearing the temperature of an inactive heaterKevin O'Connor2025-07-191-2/+4
| | | | | | | | | | | The get_temp() code will stop reporting the last temperature of the heater if there hasn't been any recent temperature updates. However, on a full mcu communication loss this can cause the verify_heater code to report a heating error prior to the mcu code reporting the communication failure. Increase the heater timeout from 5 to 7 seconds to make it more likely the mcu failure is reported first. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Confirm heater setting in mcu every 3 seconds instead of 5Kevin O'Connor2025-04-281-2/+2
| | | | | | | Increase the confirmation rate of heater enable settings. This allows the mcu to utilize faster internal speeds. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Disable heater if it appears main thread has stopped updatingKevin O'Connor2025-01-101-3/+7
| | | | | | | | | | Update the heating code to periodically check that the main thread is operating properly. This is a mitigation for some rare cases where the main thread may lockup while the background heater updating code continues to run. The goal is to detect these rare failures and disable future heater updates. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Fix typo - config.config_error() instead config.error()Kevin O'Connor2024-09-251-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Clarify reported stats after a shutdownKevin O'Connor2024-03-131-1/+6
| | | | | | | | | | The pid logic can continue after a shutdown, even though the pin commands sent to the mcu are ignored. However, this behavior can result in confusing "stats" messages in the log. Explicitly disable updates after a shutdown event so that the log statistics are more clear. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pid_calibrate: Fix PID_CALIBRATE command when used with heater_genericKevin O'Connor2024-03-131-4/+7
| | | | | | | Make sure the SAVE_CONFIG command saves the calculated PID parameters to the correct config name. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Remove deprecated thermistor "NTC 100K beta 3950"Kevin O'Connor2024-02-151-2/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: adds temperature monitorsPedro Lamas2023-08-011-1/+5
| | | | Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
* temperature_sensors: Deprecate "NTC 100K beta 3950" thermistorKevin O'Connor2021-11-101-0/+2
| | | | | | | | | | It seems the common "beta 3950" thermistors generally follow a temperature table defined by the new "Generic 3950" definition. Using a table that actually follows the "beta 3950" temperature curve is generally less accurate. Deprecate the existing "NTC 100K beta 3950" definition to avoid this common issue. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* temperature_sensors: Define default sensors in new config fileKevin O'Connor2021-11-101-8/+16
| | | | | | | Move the default list of sensor modules from heaters.py to a new temperature_sensors.cfg config file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Remove support for deprecated pid_integral_max optionKevin O'Connor2021-11-021-4/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: round reported temps to 2 decimal placesEric Callahan2021-10-151-1/+1
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* configfile: Add support for reporting deprecated optionsKevin O'Connor2021-09-161-0/+1
| | | | | | | Add a new printer.configfile.warnings with a list of config features that are deprecated. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Change default smooth_time from 2 seconds to 1 secondKevin O'Connor2021-09-031-1/+1
| | | | | | | | | | | | A larger smooth_time results in a slower reaction time for the PID. This increased delay can cause temperature oscillations with high power heaters. Many boards produce good results without any smoothing. So, it seems a smooth_time of 1 second is a better default. Reported by @ReXT3D. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Make sure set_temp() command wakes up the idle_timeoutKevin O'Connor2021-03-051-2/+9
| | | | | | | | | Introduce a heaters.set_temperature() command and call that from commands that set a heater temperature. This new function calls toolhead.register_lookahead_callback() so that the idle_timeout gets notification that activity has occurred. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* temperature_host: Rename rpi_temperature and add support for custom pathsEvgenii2021-02-191-1/+1
| | | | | Signed-off-by: Evgenii Shavrin <shavrin0591@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* ds18b20: new module for 1-wire temperature sensor (#3462)Alan Lord2021-02-021-1/+2
| | | | | | | | | 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>
* gcode_macro: Use deepcopy() on get_status() resultsKevin O'Connor2021-01-201-2/+2
| | | | | | | | | If a get_status() method returns a mutable object (such as a list or dict) then it would be possible for a gcode command template to incorrectly alter the program's internal state. Perform a deepcopy() operation on all get_status() return results to avoid that. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Make MINIMUM optional for TEMPERATURE_WAIT command (#3674)Justin Schuh2020-12-241-1/+4
| | | Signed-off-by: Justin Schuh <code@justinschuh.com>
* heaters: Add MAXIMUM option to TEMPERATURE_WAIT commandJustin Schuh2020-12-231-1/+2
| | | | Signed-off-by: Justin Schuh <code@justinschuh.com>
* heaters: Fix TEMPERATURE_WAIT command with extruder and heater_bedKevin O'Connor2020-12-221-1/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Always register heater pin as a pwm pinKevin O'Connor2020-12-151-7/+4
| | | | | | | There's no need to sometimes register the pin as a 'digital_out' pin instead of as a 'pwm' pin. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: add last pwm value to heater.get_status (#3621)Stefan Dej2020-12-131-1/+3
| | | Signed-off-by: Stefan Dej <meteyou@gmail.com>
* temperature_mcu: Add enhanced support for monitoring mcu temperatureKevin O'Connor2020-12-101-1/+2
| | | | | | | Add a "temperature_mcu" tool that can monitor builtin micro-controller temperature sensors. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Add a TEMPERATURE_WAIT commandKevin O'Connor2020-12-071-2/+23
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rpi_temperature: New module to monitor RPi temperature (#3587)Al2020-12-031-1/+1
| | | | | Module to monitor RPi cpu temperature Signed-off-by: Al Crate <aleph@al3ph.org>
* heaters: Add sensors to printer.heaters.available_sensors even if no gcode_idKevin O'Connor2020-11-011-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Don't raise an error if PID Ki is set to zeroKevin O'Connor2020-10-171-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Disable unused pwm output debugging infoKevin O'Connor2020-09-171-3/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lm75: Added support for LM75/LM75A I2C connected temperature sensors (#3101)combolek2020-07-191-1/+1
| | | Signed-off-by: Boleslaw Ciesielski <combolek@users.noreply.github.com>
* klippy: Rename try_load_module() to load_object()Kevin O'Connor2020-05-081-7/+6
| | | | | | | | Rename try_load_module() so that it uses consistent naming for "printer objects". Change the function to raise an error by default if the specified module does not exist. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Move "ok" tracking to GCodeCommand classKevin O'Connor2020-05-051-2/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-10/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* htu21d: Support for HTI21D family sensor on I2C bus (#2803)Lucio Tarantino2020-05-031-0/+1
| | | Signed-off-by: Lucio Tarantino <lucio.tarantino@gmail.com>
* heaters: Make heater.py an "extras" moduleKevin O'Connor2020-04-251-0/+327
The heater logic is an independent module that does not need to be treated as part of the "core" klipper code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>