Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change modem preset shortcuts to not request channels, and to request remote config when needed #668

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions meshtastic/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,11 @@
"Warning: Cannot set modem preset for non-primary channel", 1
)
# Overwrite modem_preset
prefs = interface.getNode(args.dest).localConfig
prefs.lora.modem_preset = modem_preset
interface.getNode(args.dest).writeConfig("lora")
node = interface.getNode(args.dest, False)
if len(node.localConfig.ListFields()) == 0:
node.requestConfig(node.localConfig.DESCRIPTOR.fields_by_name.get("lora"))
node.localConfig.lora.modem_preset = modem_preset
node.writeConfig("lora")

Check warning on line 735 in meshtastic/__main__.py

View check run for this annotation

Codecov / codecov/patch

meshtastic/__main__.py#L731-L735

Added lines #L731 - L735 were not covered by tests

# handle the simple radio set commands
if args.ch_vlongslow:
Expand Down
Loading