diff --git a/klippy/extras/pid_calibrate.py b/klippy/extras/pid_calibrate.py index 0cad07f5..2bc6566c 100644 --- a/klippy/extras/pid_calibrate.py +++ b/klippy/extras/pid_calibrate.py @@ -34,6 +34,8 @@ class PIDCalibrate: heater.set_control(old_control) if write_file: calibrate.write_file('/tmp/heattest.txt') + if calibrate.check_busy(0., 0., 0.): + raise gcmd.error("pid_calibrate interrupted") # Log and report results Kp, Ki, Kd = calibrate.calc_final_pid() logging.info("Autotune: final: Kp=%f Ki=%f Kd=%f", Kp, Ki, Kd)