stepcompress: Generate steps in a per-stepper background thread

Create a thread for each stepper and use it for step generation and
step compression.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2025-09-03 15:29:24 -04:00
parent 96c3ca160e
commit a89694ac68
8 changed files with 175 additions and 44 deletions

View File

@@ -44,7 +44,8 @@ class MCU_stepper:
self._reset_cmd_tag = self._get_position_cmd = None
self._active_callbacks = []
motion_queuing = printer.load_object(config, 'motion_queuing')
self._stepqueue = motion_queuing.allocate_stepcompress(mcu, oid)
sname = self._name.split()[-1]
self._stepqueue = motion_queuing.allocate_stepcompress(mcu, oid, sname)
ffi_main, ffi_lib = chelper.get_ffi()
ffi_lib.stepcompress_set_invert_sdir(self._stepqueue, self._invert_dir)
self._stepper_kinematics = None