Skip to content

Commit eb85439

Browse files
committed
rename function
1 parent 885eb48 commit eb85439

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

meshtastic/__main__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,16 +1122,16 @@ def subscribe() -> None:
11221122

11231123
# pub.subscribe(onNode, "meshtastic.node")
11241124

1125-
def ensure_true_defaults(config_dict: dict, true_defaults: set[tuple[str, ...]]) -> None:
1126-
"""Ensure that default=True keys are present in the config_dict and set to True."""
1125+
def set_missing_flags_false(config_dict: dict, true_defaults: set[tuple[str, ...]]) -> None:
1126+
"""Ensure that mission default=True keys are present in the config_dict and set to False."""
11271127
for path in true_defaults:
11281128
d = config_dict
11291129
for key in path[:-1]:
11301130
if key not in d or not isinstance(d[key], dict):
11311131
d[key] = {}
11321132
d = d[key]
11331133
if path[-1] not in d:
1134-
d[path[-1]] = True
1134+
d[path[-1]] = False
11351135

11361136
def export_config(interface) -> str:
11371137
"""used in --export-config"""
@@ -1205,7 +1205,7 @@ def export_config(interface) -> str:
12051205
else:
12061206
configObj["config"] = config
12071207

1208-
ensure_true_defaults(configObj["config"], true_defaults)
1208+
set_missing_flags_false(configObj["config"], true_defaults)
12091209

12101210
module_config = MessageToDict(interface.localNode.moduleConfig)
12111211
if module_config:

0 commit comments

Comments
 (0)