mirror of
https://github.com/meshtastic/python.git
synced 2026-07-31 00:56:51 -04:00
Update ch-preset shorthand arguments
This commit is contained in:
@@ -969,9 +969,15 @@ def onConnected(interface):
|
||||
if args.ch_longslow:
|
||||
setSimpleConfig(config_pb2.Config.LoRaConfig.ModemPreset.LONG_SLOW)
|
||||
|
||||
if args.ch_longmod:
|
||||
setSimpleConfig(config_pb2.config.LoRaConfig.ModemPreset.LONG_MODERATE)
|
||||
|
||||
if args.ch_longfast:
|
||||
setSimpleConfig(config_pb2.Config.LoRaConfig.ModemPreset.LONG_FAST)
|
||||
|
||||
if args.ch_longturbo:
|
||||
setSimpleConfig(config_pb2.config.LoRaConfig.ModemPreset.LONG_TURBO)
|
||||
|
||||
if args.ch_medslow:
|
||||
setSimpleConfig(config_pb2.Config.LoRaConfig.ModemPreset.MEDIUM_SLOW)
|
||||
|
||||
@@ -984,6 +990,9 @@ def onConnected(interface):
|
||||
if args.ch_shortfast:
|
||||
setSimpleConfig(config_pb2.Config.LoRaConfig.ModemPreset.SHORT_FAST)
|
||||
|
||||
if args.ch_shortturbo:
|
||||
setSimpleConfig(config_pb2.config.LoRaConfig.ModemPreset.SHORT_TURBO)
|
||||
|
||||
if args.ch_set or args.ch_enable or args.ch_disable:
|
||||
closeNow = True
|
||||
|
||||
@@ -1960,43 +1969,61 @@ def addConfigArgs(parser: argparse.ArgumentParser) -> argparse.ArgumentParser:
|
||||
|
||||
group.add_argument(
|
||||
"--ch-vlongslow",
|
||||
help="Change to the very long-range and slow modem preset",
|
||||
help="Change to the VERY_LONG_SLOW modem preset. Deprecated sincce 2.5 firmware.",
|
||||
action="store_true",
|
||||
)
|
||||
|
||||
group.add_argument(
|
||||
"--ch-longslow",
|
||||
help="Change to the long-range and slow modem preset",
|
||||
help="Change to the LONG_SLOW modem preset. Deprecated since 2.7 firmware.",
|
||||
action="store_true",
|
||||
)
|
||||
|
||||
group.add_argument(
|
||||
"--ch-longmod", "--ch-longmoderate",
|
||||
help="Change to the LONG_MODERATE modem preset",
|
||||
action="store_true",
|
||||
)
|
||||
|
||||
group.add_argument(
|
||||
"--ch-longfast",
|
||||
help="Change to the long-range and fast modem preset",
|
||||
help="Change to the LONG_FAST modem preset",
|
||||
action="store_true",
|
||||
)
|
||||
|
||||
group.add_argument(
|
||||
"--ch-longturbo",
|
||||
help="Change to the LONG_TURBO preset",
|
||||
action="store_true",
|
||||
)
|
||||
|
||||
group.add_argument(
|
||||
"--ch-medslow",
|
||||
help="Change to the med-range and slow modem preset",
|
||||
help="Change to the MEDIUM_SLOW modem preset",
|
||||
action="store_true",
|
||||
)
|
||||
|
||||
group.add_argument(
|
||||
"--ch-medfast",
|
||||
help="Change to the med-range and fast modem preset",
|
||||
help="Change to the MEDIUM_FAST modem preset",
|
||||
action="store_true",
|
||||
)
|
||||
|
||||
group.add_argument(
|
||||
"--ch-shortslow",
|
||||
help="Change to the short-range and slow modem preset",
|
||||
help="Change to the SHORT_SLOW modem preset",
|
||||
action="store_true",
|
||||
)
|
||||
|
||||
group.add_argument(
|
||||
"--ch-shortfast",
|
||||
help="Change to the short-range and fast modem preset",
|
||||
help="Change to the SHORT_FAST modem preset",
|
||||
action="store_true",
|
||||
)
|
||||
|
||||
group.add_argument(
|
||||
"--ch-shortturbo",
|
||||
help="Change to the SHORT_TURBO modem preset",
|
||||
action="store_true",
|
||||
)
|
||||
|
||||
|
||||
@@ -262,12 +262,14 @@ def test_smokevirt_ch_set_name(firmware_node):
|
||||
|
||||
|
||||
_CH_PRESETS = [
|
||||
("--ch-longslow", config_pb2.Config.LoRaConfig.ModemPreset.LONG_SLOW),
|
||||
("--ch-longmod", config_pb2.Config.LoRaConfig.ModemPreset.LONG_MODERATE),
|
||||
("--ch-longfast", config_pb2.Config.LoRaConfig.ModemPreset.LONG_FAST),
|
||||
("--ch-longturbo", config_pb2.Config.LoRaConfig.ModemPreset.LONG_TURBO),
|
||||
("--ch-medslow", config_pb2.Config.LoRaConfig.ModemPreset.MEDIUM_SLOW),
|
||||
("--ch-medfast", config_pb2.Config.LoRaConfig.ModemPreset.MEDIUM_FAST),
|
||||
("--ch-shortslow", config_pb2.Config.LoRaConfig.ModemPreset.SHORT_SLOW),
|
||||
("--ch-shortfast", config_pb2.Config.LoRaConfig.ModemPreset.SHORT_FAST),
|
||||
("--ch-shortturbo", config_pb2.Config.LoRaConfig.ModemPreset.SHORT_TURBO),
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user