parameter command to change transmitter timeout

This commit is contained in:
Jakob Meier 2023-02-02 16:01:56 +01:00
parent c633893df4
commit a3a3aaa883

View File

@ -19,6 +19,7 @@ from tmtccmd.tc.pus_20_fsfw_param import (
class ParameterId(enum.IntEnum):
DATARATE = 0
TRANSMITTER_TIMEOUT = 1
class Submode(enum.IntEnum):
@ -37,6 +38,7 @@ class OpCode:
TX_AND_RX_CARRIER_WAVE = "rx_and_tx_carrier_wave"
UPDATE_DEFAULT_DATARATE_LOW = "update_default_rate_low"
UPDATE_DEFAULT_DATARATE_HIGH = "update_default_rate_high"
CHANGE_TRANSMITTER_TIMEOUT = "change_transmitter_timeout"
class Info:
@ -47,6 +49,7 @@ class Info:
TX_AND_RX_CARRIER_WAVE = "Syrlinks with TX carrier wave"
UPDATE_DEFAULT_DATARATE_LOW = "Configure default low datarate (BPSK modulation)"
UPDATE_DEFAULT_DATARATE_HIGH = "Configure default high datarate (0QPSK modulation)"
CHANGE_TRANSMITTER_TIMEOUT = "Changes the transmitter timeout"
@service_provider(CustomServiceList.COM_SS)
@ -101,6 +104,19 @@ def build_com_subsystem_cmd(p: ServiceProviderParams):
q.add_pus_tc(
create_mode_command(COM_SUBSYSTEM_ID, Submode.RX_AND_TX_CARRIER_WAVE, 0)
)
elif o == OpCode.CHANGE_TRANSMITTER_TIMEOUT:
timeout = int(input("Specify timeout to set: "))
q.add_log_cmd(Info.CHANGE_TRANSMITTER_TIMEOUT)
q.add_pus_tc(
create_load_param_cmd(
pack_scalar_u8_parameter_app_data(
COM_SUBSYSTEM_ID,
0,
ParameterId.TRANSMITTER_TIMEOUT,
timeout,
)
)
)
@tmtc_definitions_provider