extruder: Support a minimum extrude temperature

Allow the config file to specify the minimum temperature for the
extruder and check for that temperature prior to moving the extruder
motor.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2016-09-30 19:04:24 -04:00
parent 3167e8ddbe
commit 9faa0fbd25
3 changed files with 14 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import logging
import stepper, heater
import stepper, heater, homing
class PrinterExtruder:
def __init__(self, printer, config):
@@ -20,6 +20,8 @@ class PrinterExtruder:
def motor_off(self, move_time):
self.stepper.motor_enable(move_time, 0)
def check_move(self, move):
if not self.heater.can_extrude:
raise homing.EndstopError(move.pos, "Extrude below minimum temp")
if (not move.do_calc_junction
and not move.axes_d[0] and not move.axes_d[1]
and not move.axes_d[2]):