change medium to mid

This commit is contained in:
Mike Kinney
2022-03-02 11:29:38 -08:00
parent fd752bedc5
commit 68530f6e11
2 changed files with 7 additions and 7 deletions

View File

@@ -440,7 +440,7 @@ def onConnected(interface):
ch = interface.getNode(args.dest).deleteChannel(channelIndex)
ch_changes = [args.ch_vlongslow, args.ch_longslow, args.ch_longfast,
args.ch_mediumslow, args.ch_mediumfast,
args.ch_midslow, args.ch_midfast,
args.ch_shortslow, args.ch_shortfast]
any_primary_channel_changes = any(x for x in ch_changes)
if args.ch_set or any_primary_channel_changes or args.ch_enable or args.ch_disable:
@@ -490,10 +490,10 @@ def onConnected(interface):
if args.ch_longfast:
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.LongFast)
if args.ch_mediumslow:
if args.ch_midslow:
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.MidSlow)
if args.ch_mediumfast:
if args.ch_midfast:
setSimpleChannel(channel_pb2.ChannelSettings.ModemConfig.MidFast)
if args.ch_shortslow:
@@ -814,10 +814,10 @@ def initParser():
"--ch-longfast", help="Change to the long-range and fast channel", action='store_true')
parser.add_argument(
"--ch-mediumslow", help="Change to the mid-range and slow channel", action='store_true')
"--ch-midslow", help="Change to the mid-range and slow channel", action='store_true')
parser.add_argument(
"--ch-mediumfast", help="Change to the mid-range and fast channel", action='store_true')
"--ch-midfast", help="Change to the mid-range and fast channel", action='store_true')
parser.add_argument(
"--ch-shortslow", help="Change to the short-range and slow channel", action='store_true')

View File

@@ -1285,8 +1285,8 @@ def test_main_ch_enable_primary_channel(capsys):
@pytest.mark.usefixtures("reset_globals")
def test_main_ch_range_options(capsys):
"""Test changing the various range options."""
range_options = ['--ch-vlongslow', '--ch-longslow', '--ch-longfast', '--ch-mediumslow',
'--ch-mediumfast', '--ch-shortslow', '--ch-shortfast']
range_options = ['--ch-vlongslow', '--ch-longslow', '--ch-longfast', '--ch-midslow',
'--ch-midfast', '--ch-shortslow', '--ch-shortfast']
for range_option in range_options:
sys.argv = ['', f"{range_option}" ]
Globals.getInstance().set_args(sys.argv)