Skip to content

Commit

Permalink
serialhdl: Add a get_serialqueue() method
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin O'Connor <[email protected]>
  • Loading branch information
KevinOConnor committed Jan 6, 2023
1 parent a564824 commit 4395ae9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions klippy/mcu.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _build_config(self):
"trsync_state oid=%c can_trigger=%c trigger_reason=%c clock=%u")
ffi_main, ffi_lib = chelper.get_ffi()
self._trdispatch_mcu = ffi_main.gc(ffi_lib.trdispatch_mcu_alloc(
self._trdispatch, mcu._serial.serialqueue, # XXX
self._trdispatch, mcu._serial.get_serialqueue(), # XXX
self._cmd_queue, self._oid, set_timeout_tag, trigger_tag,
state_tag), ffi_lib.free)
def _shutdown(self):
Expand Down Expand Up @@ -746,7 +746,7 @@ def _connect(self):
raise error("Too few moves available on MCU '%s'" % (self._name,))
ffi_main, ffi_lib = chelper.get_ffi()
self._steppersync = ffi_main.gc(
ffi_lib.steppersync_alloc(self._serial.serialqueue,
ffi_lib.steppersync_alloc(self._serial.get_serialqueue(),
self._stepqueues, len(self._stepqueues),
move_count-self._reserved_move_slots),
ffi_lib.steppersync_free)
Expand Down
2 changes: 2 additions & 0 deletions klippy/serialhdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ def get_reactor(self):
return self.reactor
def get_msgparser(self):
return self.msgparser
def get_serialqueue(self):
return self.serialqueue
def get_default_command_queue(self):
return self.default_cmd_queue
# Serial response callbacks
Expand Down

0 comments on commit 4395ae9

Please sign in to comment.