motion_queueing: Add flush_steppersync()

Move the mcu.flush_moves() code to motion_queuing.flush_steppersync().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2025-08-05 00:16:13 -04:00
parent c09ca4cf5a
commit 864c78f24a
3 changed files with 13 additions and 15 deletions

View File

@@ -970,19 +970,6 @@ class MCU:
# Move queue tracking
def request_move_queue_slot(self):
self._reserved_move_slots += 1
def flush_moves(self, print_time, clear_history_time):
if self._steppersync is None:
return
clock = self.print_time_to_clock(print_time)
if clock < 0:
return
clear_history_clock = \
max(0, self.print_time_to_clock(clear_history_time))
ret = self._ffi_lib.steppersync_flush(self._steppersync, clock,
clear_history_clock)
if ret:
raise error("Internal error in MCU '%s' stepcompress"
% (self._name,))
def check_active(self, print_time, eventtime):
if self._steppersync is None:
return