toolhead: Don't call into kinematic class on extrude only moves
Add a is_kinematic_move flag to the Move class and clear it on extrude only moves. Don't call the kinematic check_move() or move() methods for extrude only moves. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
f46bc0ef04
commit
f2b406fc5e
|
@ -131,8 +131,6 @@ class DeltaKinematics:
|
|||
movez_r = 0.
|
||||
inv_movexy_d = 1. / movexy_d
|
||||
if not axes_d[0] and not axes_d[1]:
|
||||
if not axes_d[2]:
|
||||
return
|
||||
movez_r = axes_d[2] * inv_movexy_d
|
||||
movexy_d = movexy_r = inv_movexy_d = 0.
|
||||
elif axes_d[2]:
|
||||
|
|
|
@ -26,9 +26,7 @@ class PrinterExtruder:
|
|||
if not self.heater.can_extrude:
|
||||
raise homing.EndstopMoveError(
|
||||
move.end_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]):
|
||||
if not move.is_kinematic_move:
|
||||
# Extrude only move - limit accel and velocity
|
||||
move.limit_speed(self.max_e_velocity, self.max_e_accel)
|
||||
def move(self, move_time, move):
|
||||
|
|
|
@ -19,7 +19,7 @@ class Move:
|
|||
self.start_pos = tuple(start_pos)
|
||||
self.end_pos = tuple(end_pos)
|
||||
self.accel = accel
|
||||
self.do_calc_junction = True
|
||||
self.do_calc_junction = self.is_kinematic_move = True
|
||||
self.axes_d = axes_d = [end_pos[i] - start_pos[i] for i in (0, 1, 2, 3)]
|
||||
if axes_d[2]:
|
||||
# Move with Z
|
||||
|
@ -34,7 +34,7 @@ class Move:
|
|||
# No move
|
||||
self.move_d = 0.
|
||||
return
|
||||
self.do_calc_junction = False
|
||||
self.do_calc_junction = self.is_kinematic_move = False
|
||||
self.move_d = move_d
|
||||
self.extrude_r = axes_d[3] / move_d
|
||||
# Junction speeds are velocities squared. The junction_delta
|
||||
|
@ -93,7 +93,8 @@ class Move:
|
|||
self.accel_t, self.cruise_t, self.decel_t = accel_t, cruise_t, decel_t
|
||||
# Generate step times for the move
|
||||
next_move_time = self.toolhead.get_next_move_time()
|
||||
self.toolhead.kin.move(next_move_time, self)
|
||||
if self.is_kinematic_move:
|
||||
self.toolhead.kin.move(next_move_time, self)
|
||||
if self.axes_d[3]:
|
||||
self.toolhead.extruder.move(next_move_time, self)
|
||||
self.toolhead.update_move_time(accel_t + cruise_t + decel_t)
|
||||
|
@ -265,7 +266,8 @@ class ToolHead:
|
|||
move = Move(self, self.commanded_pos, newpos, speed, self.max_accel)
|
||||
if not move.move_d:
|
||||
return
|
||||
self.kin.check_move(move)
|
||||
if move.is_kinematic_move:
|
||||
self.kin.check_move(move)
|
||||
if move.axes_d[3]:
|
||||
self.extruder.check_move(move)
|
||||
self.commanded_pos[:] = newpos
|
||||
|
|
Loading…
Reference in New Issue