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
2024-05-13 21:30:01 -07:00
committed by GitHub

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."