aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/heater_bed.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-03-05 18:41:21 -0500
committerKevin O'Connor <kevin@koconnor.net>2021-03-05 18:59:01 -0500
commit64b3e5642eafce951dd93be44c1b4c6a16b1e2fa (patch)
treeb00dc7c91aa94da3cc0c37d5eb91cc5230dc0480 /klippy/extras/heater_bed.py
parent1950380d6c90e57f6fa844f886d208e5391ede7b (diff)
downloadkutter-64b3e5642eafce951dd93be44c1b4c6a16b1e2fa.tar.gz
kutter-64b3e5642eafce951dd93be44c1b4c6a16b1e2fa.tar.xz
kutter-64b3e5642eafce951dd93be44c1b4c6a16b1e2fa.zip
heaters: Make sure set_temp() command wakes up the idle_timeout
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>
Diffstat (limited to 'klippy/extras/heater_bed.py')
-rw-r--r--klippy/extras/heater_bed.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/klippy/extras/heater_bed.py b/klippy/extras/heater_bed.py
index c7f69e50..96afb8fe 100644
--- a/klippy/extras/heater_bed.py
+++ b/klippy/extras/heater_bed.py
@@ -18,10 +18,8 @@ class PrinterHeaterBed:
def cmd_M140(self, gcmd, wait=False):
# Set Bed Temperature
temp = gcmd.get_float('S', 0.)
- self.heater.set_temp(temp)
- if wait and temp:
- pheaters = self.printer.lookup_object('heaters')
- pheaters.wait_for_temperature(self.heater)
+ pheaters = self.printer.lookup_object('heaters')
+ pheaters.set_temperature(self.heater, temp, wait)
def cmd_M190(self, gcmd):
# Set Bed Temperature and Wait
self.cmd_M140(gcmd, wait=True)