mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-18 20:28:10 -06:00
console: Add LIST command that shows available commands and variables
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
86a762b2b7
commit
58811b5c44
2 changed files with 18 additions and 2 deletions
|
@ -183,6 +183,7 @@ class MessageParser:
|
|||
error = error
|
||||
def __init__(self):
|
||||
self.unknown = UnknownFormat()
|
||||
self.command_ids = []
|
||||
self.messages_by_id = {}
|
||||
self.messages_by_name = {}
|
||||
self.static_strings = {}
|
||||
|
@ -310,6 +311,7 @@ class MessageParser:
|
|||
data = json.loads(data)
|
||||
messages = data.get('messages')
|
||||
commands = data.get('commands')
|
||||
self.command_ids = commands
|
||||
responses = data.get('responses')
|
||||
self._init_messages(messages, commands+responses)
|
||||
static_strings = data.get('static_strings', {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue