aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/heater.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-06-27 14:39:20 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-06-27 14:39:20 -0400
commit4889e8241d441141ae6826550607d08ef3011f60 (patch)
treebc68562f6b5b9dcb8e92772bd5c211f306b04e34 /klippy/heater.py
parent7e497af184a24d42bfdb62337e01d188cf630a8b (diff)
downloadkutter-4889e8241d441141ae6826550607d08ef3011f60.tar.gz
kutter-4889e8241d441141ae6826550607d08ef3011f60.tar.xz
kutter-4889e8241d441141ae6826550607d08ef3011f60.zip
pid_calibrate: Update the heater's target temperature during calibration
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>
Diffstat (limited to 'klippy/heater.py')
-rw-r--r--klippy/heater.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/klippy/heater.py b/klippy/heater.py
index 0376ed56..0cb54343 100644
--- a/klippy/heater.py
+++ b/klippy/heater.py
@@ -105,6 +105,10 @@ class Heater:
self.control = control
self.target_temp = 0.
return old_control
+ def alter_target(self, target_temp):
+ if target_temp:
+ target_temp = max(self.min_temp, min(self.max_temp, target_temp))
+ self.target_temp = target_temp
def stats(self, eventtime):
with self.lock:
target_temp = self.target_temp