mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-18 20:28:10 -06:00
serialhdl: Add a wrapper around the results of lookup_command()
Add a lookup_command() method to the SerialReader class that provides a wrapper that stores the serial and commandqueue references. This makes it easier to run the send() method. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
8518da9824
commit
b139a8561f
6 changed files with 110 additions and 106 deletions
|
@ -108,7 +108,7 @@ class MessageFormat:
|
|||
self.param_types = [MessageTypes[fmt] for name, fmt in argparts]
|
||||
self.param_names = [(name, MessageTypes[fmt]) for name, fmt in argparts]
|
||||
self.name_to_type = dict(self.param_names)
|
||||
def encode(self, *params):
|
||||
def encode(self, params):
|
||||
out = []
|
||||
out.append(self.msgid)
|
||||
for i, t in enumerate(self.param_types):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue