diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-12-28 11:48:40 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-12-28 22:38:28 -0500 |
commit | f2b406fc5e51e21af67eee2dc4a0bcec0f717029 (patch) | |
tree | ff5ba4761c54968b85693d6a9ef1bff86503fc40 /klippy/toolhead.py | |
parent | f46bc0ef046f3848d64666778a304c85bb5439a3 (diff) | |
download | kutter-f2b406fc5e51e21af67eee2dc4a0bcec0f717029.tar.gz kutter-f2b406fc5e51e21af67eee2dc4a0bcec0f717029.tar.xz kutter-f2b406fc5e51e21af67eee2dc4a0bcec0f717029.zip |
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>
Diffstat (limited to 'klippy/toolhead.py')
-rw-r--r-- | klippy/toolhead.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py index 4036b805..504848f3 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -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 |