manual_stepper: Implement "drip moves" for manual stepper STOP_ON_ENDSTOP

Currently, `MANUAL_STEPPER STOP_ON_ENDSTOP=1` type commands will move
until hitting the endstop, but it will still always consume the total
amount of move time.  That is, following moves can't be started until
the total possible time of the homing move is completed.

Implement "drip moves" so that the code only schedules the movement in
small segments.  This allows following movements to be scheduled
without a significant delay.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2025-04-12 16:54:49 -04:00
parent 765de72f9e
commit db7a9cf071
3 changed files with 27 additions and 6 deletions

View File

@@ -503,7 +503,7 @@ class ToolHead:
def get_extruder(self):
return self.extruder
# Homing "drip move" handling
def drip_update_time(self, next_print_time, drip_completion):
def drip_update_time(self, next_print_time, drip_completion, addstepper=()):
# Transition from "NeedPrime"/"Priming"/main state to "Drip" state
self.special_queuing_state = "Drip"
self.need_check_pause = self.reactor.NEVER
@@ -526,6 +526,8 @@ class ToolHead:
npt = min(self.print_time + DRIP_SEGMENT_TIME, next_print_time)
self.note_mcu_movequeue_activity(npt + self.kin_flush_delay,
set_step_gen_time=True)
for stepper in addstepper:
stepper.generate_steps(npt)
self._advance_move_time(npt)
# Exit "Drip" state
self.reactor.update_timer(self.flush_timer, self.reactor.NOW)