extruder: Extend over extrusion checks to retractions
Ensure a move with a retraction (negative extrude) is also checked for sane extrusion rates. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
0fa35254c6
commit
253517096e
|
@ -51,12 +51,13 @@ class PrinterExtruder:
|
|||
move.end_pos, "Extrude below minimum temp")
|
||||
if not move.is_kinematic_move:
|
||||
# Extrude only move - limit accel and velocity
|
||||
if move.axes_d[3] > self.max_e_dist:
|
||||
if abs(move.axes_d[3]) > self.max_e_dist:
|
||||
raise homing.EndstopMoveError(
|
||||
move.end_pos, "Extrude only move too long")
|
||||
move.limit_speed(self.max_e_velocity, self.max_e_accel)
|
||||
elif (move.extrude_r > self.max_extrude_ratio
|
||||
and move.axes_d[3] > self.nozzle_diameter*self.max_extrude_ratio):
|
||||
elif (abs(move.extrude_r) > self.max_extrude_ratio
|
||||
and (abs(move.axes_d[3])
|
||||
> self.nozzle_diameter*self.max_extrude_ratio)):
|
||||
logging.debug("Overextrude: %s vs %s" % (
|
||||
move.extrude_r, self.max_extrude_ratio))
|
||||
raise homing.EndstopMoveError(
|
||||
|
|
Loading…
Reference in New Issue