aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/pid_calibrate.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/extras/pid_calibrate.py')
-rw-r--r--klippy/extras/pid_calibrate.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/klippy/extras/pid_calibrate.py b/klippy/extras/pid_calibrate.py
index f32f1be7..20641167 100644
--- a/klippy/extras/pid_calibrate.py
+++ b/klippy/extras/pid_calibrate.py
@@ -43,11 +43,12 @@ class PIDCalibrate:
"The SAVE_CONFIG command will update the printer config file\n"
"with these parameters and restart the printer." % (Kp, Ki, Kd))
# Store results for SAVE_CONFIG
+ cfgname = heater.get_name()
configfile = self.printer.lookup_object('configfile')
- configfile.set(heater_name, 'control', 'pid')
- configfile.set(heater_name, 'pid_Kp', "%.3f" % (Kp,))
- configfile.set(heater_name, 'pid_Ki', "%.3f" % (Ki,))
- configfile.set(heater_name, 'pid_Kd', "%.3f" % (Kd,))
+ configfile.set(cfgname, 'control', 'pid')
+ configfile.set(cfgname, 'pid_Kp', "%.3f" % (Kp,))
+ configfile.set(cfgname, 'pid_Ki', "%.3f" % (Ki,))
+ configfile.set(cfgname, 'pid_Kd', "%.3f" % (Kd,))
TUNE_PID_DELTA = 5.0