aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/heater.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-01-02 19:17:47 -0500
committerKevin O'Connor <kevin@koconnor.net>2020-01-03 18:13:57 -0500
commit4b6a65c1e03a889e6004c00f301164495965e49c (patch)
treef3d7d1a4f0bb75beeb731512eaa77c46e5596a94 /klippy/heater.py
parentdabffcc22c84c92878bbd680a57e23874ded757d (diff)
downloadkutter-4b6a65c1e03a889e6004c00f301164495965e49c.tar.gz
kutter-4b6a65c1e03a889e6004c00f301164495965e49c.tar.xz
kutter-4b6a65c1e03a889e6004c00f301164495965e49c.zip
heater: Do not flush look-ahead queue on a heater temperature update
The print_time parameter of heater.set_temp() is not currently used and it isn't necessary to flush the look-ahead queue just get the print_time. Remove the parameter from heater.set_temp() to avoid flushing the look-ahead queue. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/heater.py')
-rw-r--r--klippy/heater.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/klippy/heater.py b/klippy/heater.py
index c16cafaa..706ce718 100644
--- a/klippy/heater.py
+++ b/klippy/heater.py
@@ -97,7 +97,7 @@ class Heater:
return self.max_power
def get_smooth_time(self):
return self.smooth_time
- def set_temp(self, print_time, degrees):
+ def set_temp(self, degrees):
if degrees and (degrees < self.min_temp or degrees > self.max_temp):
raise self.printer.command_error(
"Requested temperature (%.1f) out of range (%.1f:%.1f)"
@@ -139,9 +139,8 @@ class Heater:
return {'temperature': smoothed_temp, 'target': target_temp}
cmd_SET_HEATER_TEMPERATURE_help = "Sets a heater temperature"
def cmd_SET_HEATER_TEMPERATURE(self, params):
- print_time = self.printer.lookup_object('toolhead').get_last_move_time()
temp = self.gcode.get_float('TARGET', params, 0.)
- self.set_temp(print_time, temp)
+ self.set_temp(temp)
######################################################################
@@ -277,13 +276,12 @@ class PrinterHeaters:
"G-Code sensor id %s already registered" % (gcode_id,))
self.gcode_id_to_sensor[gcode_id] = psensor
self.available_sensors.append(config.get_name())
- def turn_off_all_heaters(self, print_time):
+ def turn_off_all_heaters(self, print_time=0.):
for heater in self.heaters.values():
- heater.set_temp(print_time, 0.)
+ heater.set_temp(0.)
cmd_TURN_OFF_HEATERS_help = "Turn off all heaters"
def cmd_TURN_OFF_HEATERS(self, params):
- print_time = self.printer.lookup_object('toolhead').get_last_move_time()
- self.turn_off_all_heaters(print_time)
+ self.turn_off_all_heaters()
def get_status(self, eventtime):
return {'available_heaters': self.available_heaters,
'available_sensors': self.available_sensors}