motion_queuing: Move flushing logic from toolhead.py to motion_queuing module

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2025-08-12 20:07:08 -04:00
parent a1e3964878
commit 2d489e85de
6 changed files with 149 additions and 135 deletions

View File

@@ -80,8 +80,7 @@ class ManualStepper:
self.sync_print_time()
self.next_cmd_time = self._submit_move(self.next_cmd_time, movepos,
speed, accel)
toolhead = self.printer.lookup_object('toolhead')
toolhead.note_mcu_movequeue_activity(self.next_cmd_time)
self.motion_queuing.note_mcu_movequeue_activity(self.next_cmd_time)
if sync:
self.sync_print_time()
def do_homing_move(self, movepos, speed, accel, triggered, check_trigger):
@@ -209,8 +208,8 @@ class ManualStepper:
end_time = self._submit_move(start_time, newpos[0],
speed, self.homing_accel)
# Drip updates to motors
toolhead = self.printer.lookup_object('toolhead')
toolhead.drip_update_time(start_time, end_time, drip_completion)
self.motion_queuing.drip_update_time(start_time, end_time,
drip_completion)
# Clear trapq of any remaining parts of movement
reactor = self.printer.get_reactor()
self.motion_queuing.wipe_trapq(self.trapq)