From eb85439000a2c6b597f64666e503f8d1f45dbaa7 Mon Sep 17 00:00:00 2001 From: pdxlocations Date: Sat, 26 Jul 2025 22:27:10 -0700 Subject: [PATCH] rename function --- meshtastic/__main__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index b46d512..8889a5b 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -1122,8 +1122,8 @@ def subscribe() -> None: # pub.subscribe(onNode, "meshtastic.node") -def ensure_true_defaults(config_dict: dict, true_defaults: set[tuple[str, ...]]) -> None: - """Ensure that default=True keys are present in the config_dict and set to True.""" +def set_missing_flags_false(config_dict: dict, true_defaults: set[tuple[str, ...]]) -> None: + """Ensure that mission default=True keys are present in the config_dict and set to False.""" for path in true_defaults: d = config_dict for key in path[:-1]: @@ -1131,7 +1131,7 @@ def ensure_true_defaults(config_dict: dict, true_defaults: set[tuple[str, ...]]) d[key] = {} d = d[key] if path[-1] not in d: - d[path[-1]] = True + d[path[-1]] = False def export_config(interface) -> str: """used in --export-config""" @@ -1205,7 +1205,7 @@ def export_config(interface) -> str: else: configObj["config"] = config - ensure_true_defaults(configObj["config"], true_defaults) + set_missing_flags_false(configObj["config"], true_defaults) module_config = MessageToDict(interface.localNode.moduleConfig) if module_config: