steppersync: Support sending messages directly from syncemitter

Move msg_queue allocation from stepcompress to syncemitter.  With this
change the pwm_tool module does not need to allocate a stepcompress
object.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2025-09-18 21:03:39 -04:00
parent d831d66c11
commit e78d11bc6f
8 changed files with 40 additions and 48 deletions

View File

@@ -45,8 +45,9 @@ class MCU_stepper:
self._active_callbacks = []
motion_queuing = printer.load_object(config, 'motion_queuing')
sname = self._name.split()[-1]
self._stepqueue = motion_queuing.allocate_stepcompress(mcu, sname)
syncemitter = motion_queuing.allocate_syncemitter(mcu, sname)
ffi_main, ffi_lib = chelper.get_ffi()
self._stepqueue = ffi_lib.syncemitter_get_stepcompress(syncemitter)
ffi_lib.stepcompress_set_invert_sdir(self._stepqueue, self._invert_dir)
self._stepper_kinematics = None
self._itersolve_check_active = ffi_lib.itersolve_check_active