toolhead: Fix homing moves not apply kinematic acceleration limits
During a "drip feed" move, both the move's maximum speed and maximum acceleration may be limited by the kinematics. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
296ab7d402
commit
05edd556c3
|
@ -427,6 +427,7 @@ class ToolHead:
|
||||||
return
|
return
|
||||||
self.kin.check_move(move)
|
self.kin.check_move(move)
|
||||||
speed = math.sqrt(move.max_cruise_v2)
|
speed = math.sqrt(move.max_cruise_v2)
|
||||||
|
move_accel = move.accel
|
||||||
# Transition to "Flushed" state and then to "Drip" state
|
# Transition to "Flushed" state and then to "Drip" state
|
||||||
self._full_flush()
|
self._full_flush()
|
||||||
self.special_queuing_state = "Drip"
|
self.special_queuing_state = "Drip"
|
||||||
|
@ -442,9 +443,13 @@ class ToolHead:
|
||||||
try:
|
try:
|
||||||
for i in range(num_moves-1):
|
for i in range(num_moves-1):
|
||||||
next_pos = [p + d for p, d in zip(prev_pos, submove_d)]
|
next_pos = [p + d for p, d in zip(prev_pos, submove_d)]
|
||||||
self.move_queue.add_move(Move(self, prev_pos, next_pos, speed))
|
smove = Move(self, prev_pos, next_pos, speed)
|
||||||
|
smove.limit_speed(speed, move_accel)
|
||||||
|
self.move_queue.add_move(smove)
|
||||||
prev_pos = next_pos
|
prev_pos = next_pos
|
||||||
self.move_queue.add_move(Move(self, prev_pos, move.end_pos, speed))
|
smove = Move(self, prev_pos, move.end_pos, speed)
|
||||||
|
smove.limit_speed(speed, move_accel)
|
||||||
|
self.move_queue.add_move(smove)
|
||||||
self.move_queue.flush()
|
self.move_queue.flush()
|
||||||
except DripModeEndSignal as e:
|
except DripModeEndSignal as e:
|
||||||
self.move_queue.reset()
|
self.move_queue.reset()
|
||||||
|
|
Loading…
Reference in New Issue