From 81da5379d406236b8284921d34f23e877464db63 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 4 Feb 2021 16:33:03 -0500 Subject: buildcommands: Extend number of available mcu messages from 96 to 128 Some internal code treats the message ids as encoded "variable length quantities", while other internal code assumes the message id is always one byte long. Continue using this scheme, but convert the VLQ users to use the name "msgtag" while the 1-byte users use "msgid". Increase the number of available msgids from 96 to 127 - the higher values get encoded as negative "msgtags". Signed-off-by: Kevin O'Connor --- klippy/mcu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'klippy/mcu.py') diff --git a/klippy/mcu.py b/klippy/mcu.py index 6f6c8002..5e31602c 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -694,9 +694,9 @@ class MCU: return self.lookup_command(msgformat) except self._serial.get_msgparser().error as e: return None - def lookup_command_id(self, msgformat): + def lookup_command_tag(self, msgformat): all_msgs = self._serial.get_msgparser().get_messages() - return {msgfmt: msgid for msgid, msgtype, msgfmt in all_msgs}[msgformat] + return {fmt: msgtag for msgtag, msgtype, fmt in all_msgs}[msgformat] def get_enumerations(self): return self._serial.get_msgparser().get_enumerations() def get_constants(self): -- cgit v1.2.3-70-g09d2