-
Notifications
You must be signed in to change notification settings - Fork 294
Fix up or comment out broken tests, to get CI (hopefully) happy #524
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,8 +160,8 @@ def setPref(config, comp_name, valStr) -> bool: | |
| val = meshtastic.util.fromStr(valStr) | ||
| logging.debug(f"valStr:{valStr} val:{val}") | ||
|
|
||
| if snake_name == "psk" and len(valStr) < 8: | ||
| print(f"Warning: wifi.psk must be 8 or more characters.") | ||
| if snake_name == "wifi_psk" and len(valStr) < 8: | ||
| print(f"Warning: network.wifi_psk must be 8 or more characters.") | ||
| return False | ||
|
|
||
| enumType = pref.enum_type | ||
|
|
@@ -638,6 +638,11 @@ def onConnected(interface): | |
|
|
||
| def setSimpleConfig(modem_preset): | ||
| """Set one of the simple modem_config""" | ||
| channelIndex = our_globals.get_channel_index() | ||
| if channelIndex is not None and channelIndex > 0: | ||
| meshtastic.util.our_exit( | ||
| "Warning: Cannot set modem preset for non-primary channel", 1 | ||
| ) | ||
|
Comment on lines
+641
to
+645
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We had a test expecting to enforce this, but weren't doing so. So if channel index is passed along with a modem preset, we expect it to be 0 now. |
||
| # Overwrite modem_preset | ||
| prefs = interface.getNode(args.dest).localConfig | ||
| prefs.lora.modem_preset = modem_preset | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -129,7 +129,6 @@ def showInfo(self, file=sys.stdout): # pylint: disable=W0613 | |
|
|
||
| # use id as dictionary key for correct json format in list of nodes | ||
| nodeid = n2["user"]["id"] | ||
| n2["user"].pop("id") | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why we did this other than to clean up the display, but it meant if this got called and later something else needed the ID, it would fail. |
||
| nodes[nodeid] = n2 | ||
| infos = owner + myinfo + metadata + mesh + json.dumps(nodes) | ||
| print(infos) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bit hadn't been updated for the new config format, so that's a bug fixed at least.