better names

This commit is contained in:
Robin Müller 2023-01-24 17:49:59 +01:00
parent 5998aa12a4
commit 8341ccc99d
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -41,8 +41,8 @@ class OpCode:
ON = "on" ON = "on"
NORMAL = "nml" NORMAL = "nml"
STANDBY = "set_tx_standby" STANDBY = "set_tx_standby"
SET_CW = "set_tx_carrier_wave" SET_TX_CW = "set_tx_carrier_wave"
MODULATION = "modulation" SET_TX_MODULATION = "set_tx_modulation"
HK_RX_REGS = "hk_rx_regs" HK_RX_REGS = "hk_rx_regs"
ENABLE_HK_RX_REGS = "enable_hk_rx" ENABLE_HK_RX_REGS = "enable_hk_rx"
DISABLE_HK_RX_REGS = "disable_hk_rx" DISABLE_HK_RX_REGS = "disable_hk_rx"
@ -87,10 +87,10 @@ def add_syrlinks_cmds(defs: TmtcDefinitionWrapper):
oce.add(OpCode.ON, "Syrlinks Handler: Set mode on") oce.add(OpCode.ON, "Syrlinks Handler: Set mode on")
oce.add(OpCode.NORMAL, "Syrlinks Handler: Set mode normal") oce.add(OpCode.NORMAL, "Syrlinks Handler: Set mode normal")
oce.add(OpCode.STANDBY, "Syrlinks Handler: Set TX standby") oce.add(OpCode.STANDBY, "Syrlinks Handler: Set TX standby")
oce.add(OpCode.MODULATION, "Syrlinks Handler: Set TX modulation") oce.add(OpCode.SET_TX_MODULATION, "Syrlinks Handler: Set TX modulation")
oce.add(OpCode.HK_RX_REGS, Info.HK_RX_REGS) oce.add(OpCode.HK_RX_REGS, Info.HK_RX_REGS)
oce.add(OpCode.HK_TX_REGS, Info.HK_TX_REGS) oce.add(OpCode.HK_TX_REGS, Info.HK_TX_REGS)
oce.add(OpCode.SET_CW, Info.SET_CW) oce.add(OpCode.SET_TX_CW, Info.SET_CW)
oce.add(OpCode.TX_STATUS, Info.TX_STATUS) oce.add(OpCode.TX_STATUS, Info.TX_STATUS)
oce.add(OpCode.RX_STATUS, Info.RX_STATUS) oce.add(OpCode.RX_STATUS, Info.RX_STATUS)
oce.add(OpCode.ENABLE_HK_RX_REGS, Info.ENABLE_HK_RX_REGS) oce.add(OpCode.ENABLE_HK_RX_REGS, Info.ENABLE_HK_RX_REGS)
@ -130,11 +130,11 @@ def pack_syrlinks_command(
q.add_log_cmd(f"{prefix}: Set TX mode standby") q.add_log_cmd(f"{prefix}: Set TX mode standby")
data = obyt + struct.pack("!I", CommandId.SET_TX_MODE_STANDBY) data = obyt + struct.pack("!I", CommandId.SET_TX_MODE_STANDBY)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data)) q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == OpCode.MODULATION: if op_code == OpCode.SET_TX_MODULATION:
q.add_log_cmd(f"{prefix}: Set TX mode modulation") q.add_log_cmd(f"{prefix}: Set TX mode modulation")
data = obyt + struct.pack("!I", CommandId.SET_TX_MODE_MODULATION) data = obyt + struct.pack("!I", CommandId.SET_TX_MODE_MODULATION)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data)) q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code in OpCode.SET_CW: if op_code in OpCode.SET_TX_CW:
q.add_log_cmd(f"{prefix}: {Info.SET_CW}") q.add_log_cmd(f"{prefix}: {Info.SET_CW}")
data = obyt + struct.pack("!I", CommandId.SET_TX_MODE_CW) data = obyt + struct.pack("!I", CommandId.SET_TX_MODE_CW)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data)) q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))