add command to configure default data rate

This commit is contained in:
Robin Müller 2023-01-26 16:16:09 +01:00
parent c4329558c9
commit 83f10ed253
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -46,6 +46,7 @@ class OpCode:
ON = "on"
NORMAL_RX_ONLY = "nml_rx_only"
NORMAL_RX_AND_TX_CW = "nml_carrier_wave"
NORMAL_RX_AND_TX_DEF_DATARATE = "nml_default_datarate"
NORMAL_RX_AND_TX_LOW_DATARATE = "nml_low_datarate"
NORMAL_RX_AND_TX_HIGH_DATARATE = "nml_high_datarate"
UPDATE_DEFAULT_DATARATE_LOW_RATE = "param_low_datarate"
@ -65,7 +66,7 @@ class Info:
ON = "Switch ON"
NORMAL_RX_ONLY = "NORMAL RX Only, set TX to standby"
NORMAL_RX_AND_TX_CW = "NORMAL RX and TX, TX Carrier Wave"
NORMAL_RX_AND_TX_DEFAULT_DATARATE = "NORMAL RX and TX, TX with default datarate"
NORMAL_RX_AND_TX_DEF_DATARATE = "NORMAL RX and TX, TX with default datarate"
NORMAL_RX_AND_TX_LOW_DATARATE = "NORMAL RX and TX, TX with low datarate"
NORMAL_RX_AND_TX_HIGH_DATARATE = "NORMAL RX and TX, TX with high datarate"
UPDATE_DEFAULT_DATARATE_LOW_RATE = "Update default datarate to low rate (BPSK)"
@ -123,6 +124,7 @@ def add_syrlinks_cmds(defs: TmtcDefinitionWrapper):
oce.add(OpCode.ON, Info.ON)
oce.add(OpCode.NORMAL_RX_ONLY, Info.NORMAL_RX_ONLY)
oce.add(OpCode.NORMAL_RX_AND_TX_CW, Info.NORMAL_RX_AND_TX_CW)
oce.add(OpCode.NORMAL_RX_AND_TX_DEF_DATARATE, Info.NORMAL_RX_AND_TX_DEF_DATARATE)
oce.add(OpCode.NORMAL_RX_AND_TX_LOW_DATARATE, Info.NORMAL_RX_AND_TX_LOW_DATARATE)
oce.add(OpCode.NORMAL_RX_AND_TX_HIGH_DATARATE, Info.NORMAL_RX_AND_TX_HIGH_DATARATE)
oce.add(
@ -178,6 +180,10 @@ def pack_syrlinks_command(
normal_mode_cmd(
q, Info.NORMAL_RX_AND_TX_LOW_DATARATE, Submode.RX_AND_TX_LOW_DATARATE
)
if op_code == OpCode.NORMAL_RX_AND_TX_DEF_DATARATE:
normal_mode_cmd(
q, Info.NORMAL_RX_AND_TX_DEF_DATARATE, Submode.RX_AND_TX_DEFAULT_DATARATE
)
if op_code == OpCode.NORMAL_RX_AND_TX_HIGH_DATARATE:
normal_mode_cmd(
q, Info.NORMAL_RX_AND_TX_HIGH_DATARATE, Submode.RX_AND_TX_HIGH_DATARATE