From 64b3e5642eafce951dd93be44c1b4c6a16b1e2fa Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 5 Mar 2021 18:41:21 -0500 Subject: 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 --- klippy/kinematics/extruder.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'klippy/kinematics') diff --git a/klippy/kinematics/extruder.py b/klippy/kinematics/extruder.py index 591a0531..e767abef 100644 --- a/klippy/kinematics/extruder.py +++ b/klippy/kinematics/extruder.py @@ -167,10 +167,8 @@ class PrinterExtruder: raise gcmd.error("Extruder not configured") else: extruder = self.printer.lookup_object('toolhead').get_extruder() - heater = extruder.get_heater() - heater.set_temp(temp) - if wait and temp: - self.printer.lookup_object('heaters').wait_for_temperature(heater) + pheaters = self.printer.lookup_object('heaters') + pheaters.set_temperature(extruder.get_heater(), temp, wait) def cmd_M109(self, gcmd): # Set Extruder Temperature and Wait self.cmd_M104(gcmd, wait=True) -- cgit v1.2.3-70-g09d2