aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-11-08 09:22:43 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-11-08 09:22:43 -0500
commit3b5b895a10a186ef126c6fbcb50835827b6a6471 (patch)
treeb0a3c967e400227a66015cb8647ad50d24c63cbc /klippy
parent345fc41482098ef9f42988008a4b7ef4c08b186d (diff)
downloadkutter-3b5b895a10a186ef126c6fbcb50835827b6a6471.tar.gz
kutter-3b5b895a10a186ef126c6fbcb50835827b6a6471.tar.xz
kutter-3b5b895a10a186ef126c6fbcb50835827b6a6471.zip
heater: Do not require target temperature be above min_extrude_temp
Only disable the extruder if the last measured temperature is below the minimum extrude temperature setting. Verifying the target temperature is not necessary, and it can incorrectly prevent some valid moves. It's not uncommon for scripts to retract filament immiedietly after setting the extruder temperature to zero. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy')
-rw-r--r--klippy/heater.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/klippy/heater.py b/klippy/heater.py
index bef1f48c..06bc0cd1 100644
--- a/klippy/heater.py
+++ b/klippy/heater.py
@@ -29,7 +29,7 @@ class PrinterHeater:
self.thermistor_c = Thermistors.get(config.get('thermistor_type'))
self.pullup_r = config.getfloat('pullup_resistor', 4700.)
self.min_extrude_temp = config.getfloat('min_extrude_temp', 170.)
- self.can_extrude = self.min_extrude_temp <= 0.
+ self.can_extrude = (self.min_extrude_temp <= 0.)
self.lock = threading.Lock()
self.last_temp = 0.
self.last_temp_time = 0.
@@ -91,16 +91,13 @@ class PrinterHeater:
with self.lock:
self.last_temp = temp
self.last_temp_time = read_time
- self.can_extrude = (self.last_temp >= self.min_extrude_temp
- and self.target_temp >= self.min_extrude_temp)
+ self.can_extrude = (temp >= self.min_extrude_temp)
self.control.adc_callback(read_time, temp)
#logging.debug("temp: %.3f %f = %f" % (read_time, read_value, temp))
# External commands
def set_temp(self, print_time, degrees):
with self.lock:
self.target_temp = degrees
- if self.target_temp < self.min_extrude_temp:
- self.can_extrude = False
def get_temp(self):
with self.lock:
return self.last_temp, self.target_temp