mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-18 04:08:04 -06:00
msgproto: Support multi-byte command and response ids
Update the msgproto.py code so that it can support message ids that are larger than a single byte. (The host C code in klippy/chelper/msgblock.c already supports multi-byte ids.) Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
d4bae4dffe
commit
17c645f000
2 changed files with 31 additions and 32 deletions
|
@ -87,7 +87,7 @@ class CommandWrapper:
|
|||
if cmd_queue is None:
|
||||
cmd_queue = serial.get_default_command_queue()
|
||||
self._cmd_queue = cmd_queue
|
||||
self._msgtag = msgparser.lookup_msgtag(msgformat) & 0xffffffff
|
||||
self._msgtag = msgparser.lookup_msgid(msgformat) & 0xffffffff
|
||||
def send(self, data=(), minclock=0, reqclock=0):
|
||||
cmd = self._cmd.encode(data)
|
||||
self._serial.raw_send(cmd, minclock, reqclock, self._cmd_queue)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue