diff --git a/klippy/toolhead.py b/klippy/toolhead.py index 440b88a1..458d5c51 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -17,6 +17,7 @@ class Move: self.start_pos = tuple(start_pos) self.end_pos = tuple(end_pos) self.accel = toolhead.max_accel + velocity = min(speed, toolhead.max_velocity) self.cmove = toolhead.cmove self.is_kinematic_move = True self.axes_d = axes_d = [end_pos[i] - start_pos[i] for i in (0, 1, 2, 3)] @@ -27,13 +28,15 @@ class Move: end_pos[3]) axes_d[0] = axes_d[1] = axes_d[2] = 0. self.move_d = move_d = abs(axes_d[3]) + self.accel = 99999999.9 + velocity = speed self.is_kinematic_move = False - self.min_move_t = move_d / speed + self.min_move_t = move_d / velocity # Junction speeds are tracked in velocity squared. The # delta_v2 is the maximum amount of this squared-velocity that # can change in this move. self.max_start_v2 = 0. - self.max_cruise_v2 = speed**2 + self.max_cruise_v2 = velocity**2 self.delta_v2 = 2.0 * move_d * self.accel self.max_smoothed_v2 = 0. self.smooth_delta_v2 = 2.0 * move_d * toolhead.max_accel_to_decel @@ -344,7 +347,6 @@ class ToolHead: self.commanded_pos[:] = newpos self.kin.set_position(newpos, homing_axes) def move(self, newpos, speed): - speed = min(speed, self.max_velocity) move = Move(self, self.commanded_pos, newpos, speed) if not move.move_d: return