aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/pid_calibrate.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-04-06 10:56:34 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-04-06 11:39:24 -0400
commit460cc88f3dd00bb17252c2d90d38207dfded50ab (patch)
tree409b62c954e630195e2ceae9bda9176be458e24d /klippy/extras/pid_calibrate.py
parent06d73207e73f751eca9cf19ad96251da5c245955 (diff)
downloadkutter-460cc88f3dd00bb17252c2d90d38207dfded50ab.tar.gz
kutter-460cc88f3dd00bb17252c2d90d38207dfded50ab.tar.xz
kutter-460cc88f3dd00bb17252c2d90d38207dfded50ab.zip
pid_calibrate: Make sure to unregister new control class on error
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/pid_calibrate.py')
-rw-r--r--klippy/extras/pid_calibrate.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/klippy/extras/pid_calibrate.py b/klippy/extras/pid_calibrate.py
index 99f6da71..769d8cbc 100644
--- a/klippy/extras/pid_calibrate.py
+++ b/klippy/extras/pid_calibrate.py
@@ -29,6 +29,7 @@ class PIDCalibrate:
try:
heater.set_temp(print_time, target)
except heater.error as e:
+ heater.set_control(old_control)
raise self.gcode.error(str(e))
self.gcode.bg_temp(heater)
heater.set_control(old_control)