aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/pid_calibrate.py
Commit message (Collapse)AuthorAgeFilesLines
* Isort all klippy codeTomasz Kramkowski2025-08-151-1/+3
|
* Run black on all first party python codeTomasz Kramkowski2025-08-061-37/+60
|
* pid_calibrate: Fix PID_CALIBRATE command when used with heater_genericKevin O'Connor2024-03-131-4/+5
| | | | | | | 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>
* pid_calibrate: Improve Python3 compatibility in debug file outputKevin O'Connor2022-03-291-1/+1
| | | | | | Reported by @kpishere. 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/+1
| | | | | | | | | 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>
* pid_calibrate: Update for improved python3 compatibilityKevin O'Connor2020-09-041-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extras: Use "from . import module" for relative importsKevin O'Connor2020-06-151-1/+1
| | | | | | Use alternate import syntax to improve Python3 compatibility. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pid_calibrate: Avoid internal error on a shutdownKevin O'Connor2020-06-141-0/+2
| | | | | | | | If a shutdown occurs during a PID_CALIBRATE command (eg, due to a heater problem) then exit cleanly instead of throwing an internal error. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pid_calibrate: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-10/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pid_calibrate: Fix module importKevin O'Connor2020-04-251-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Make heater.py an "extras" moduleKevin O'Connor2020-04-251-3/+3
| | | | | | | 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>
* heater: Move M105 command handling from gcode.py to heater.pyKevin O'Connor2020-04-251-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Do not flush look-ahead queue on a heater temperature updateKevin O'Connor2020-01-031-2/+2
| | | | | | | | | The print_time parameter of heater.set_temp() is not currently used and it isn't necessary to flush the look-ahead queue just get the print_time. Remove the parameter from heater.set_temp() to avoid flushing the look-ahead queue. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Rename bg_temp() to wait_for_temperature()Kevin O'Connor2019-12-161-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Use printer.command_error() instead of internal heater.error()Kevin O'Connor2019-12-161-2/+2
| | | | | | | Use the more standard command_error to report invalid temperature requests. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pid_calibrate: Add some comments on the calibration methodologyKevin O'Connor2018-10-191-2/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pid_calibrate: Support saving calibration data via SAVE_CONFIGKevin O'Connor2018-09-251-2/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Introduce smooth_time config option; remove pid_deriv_timeKevin O'Connor2018-07-061-1/+1
| | | | | | | | | | | Add generic temperature smoothing to the Heater class. This is useful to avoid min_extrude_temp and verify_heater errors due to measurement noise. Rename the pid_deriv_time config option to smooth_time so that the smoothing amount need only be specified once. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pid_calibrate: Update the heater's target temperature during calibrationKevin O'Connor2018-06-271-4/+6
| | | | | | | | Update the target temperature during the pid calibration. This gives additional feedback to the user and it makes it less likely that a verify_heater error will be raised during calibration. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Don't peak into Heater class member variablesKevin O'Connor2018-06-271-9/+10
| | | | | | The control classes should not peak into the heater member variables. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pid_calibrate: Make sure to unregister new control class on errorKevin O'Connor2018-04-061-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Move Thermistor and Linear to their own files in extras/Kevin O'Connor2018-04-041-1/+1
| | | | | | | | Move the Thermistor code to a new thermistor.py module. Move the Linear code to a new adc_temperature.py module. This simplifies the heater.py code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Move adc logic into Thermistor classKevin O'Connor2018-04-041-1/+1
| | | | | | | | The Thermistor (and Linear) class should handle all the details of reading the ADC values and converting them to temperatures. So, move that logic out of the Heater() class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Add PrinterHeaters class that stores all sensors and heatersKevin O'Connor2018-04-041-2/+3
| | | | | | | | | | | | Add a PrinterHeaters class that can stores references to available temperature sensors and stores references to instantiated heaters. Add a extras/heater_bed.py file and delay instantiation of the heater_bed object. This allows the heater.py module to be imported earlier during the setup phase, and allows the PrinterHeaters class to be available for registering sensors and heaters. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pid_calibrate: Move PID calibration logic from heater.py to new fileKevin O'Connor2018-03-181-0/+127
Drop support for M303 and PID_TUNE, and replace it with a new PID_CALIBRATE command. Move the logic for this command from heater.py to a new pid_calibrate.py file in the extras/ directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>