From 363aa995a236ab4a9ff20ff03e58a34c89619487 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 20 Oct 2022 17:13:26 -0500 Subject: [PATCH] Push it real good --- meshtastic/__main__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index cc69f0e..f2994dd 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -72,6 +72,19 @@ def getPref(config, comp_name): pref = config_type.message_type.fields_by_name.get(snake_name) if (not pref) or (not config_type): + print(f"Not found. Choices in sorted order are:") + for config_section in objDesc.fields: + config = objDesc.fields_by_name.get(config_section.name) + if not config: + names = [] + for field in config.fields: + tmp_name = f'{config_section.name}.{field.name}' + if Globals.getInstance().get_camel_case(): + tmp_name = meshtastic.util.snake_to_camel(tmp_name) + names.append(tmp_name) + for temp_name in sorted(names): + print(f" {temp_name}") + return False # read the value