Merge pull request #574 from ianmcorvidae/warn-enable-disable

add a warning on --ch-enable and --ch-disable, which should usually be avoided
This commit is contained in:
Ian McEwen authored and GitHub committed 2024-05-13 21:30:01 -07:00
commit 9de04a12e1
1 file changed
+4
+4
View File
@@ -721,6 +721,10 @@ def onConnected(interface):
ch = interface.getNode(args.dest).channels[channelIndex]
if args.ch_enable or args.ch_disable:
print(
"Warning: --ch-enable and --ch-disable can produce noncontiguous channels, "
"which can cause errors in some clients. Whenever possible, use --ch-add and --ch-del instead."
)
if channelIndex == 0:
meshtastic.util.our_exit(
"Warning: Cannot enable/disable PRIMARY channel."