add enable HK set cmd
EIVE/-/pipeline/head This commit looks good Details
EIVE/-/pipeline/pr-main This commit looks good Details

This commit is contained in:
Robin Müller 2023-06-18 16:19:00 +02:00
parent b9038f1c86
commit 79060acfb6
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 13 additions and 1 deletions

View File

@ -177,6 +177,7 @@ def handle_regular_hk_print( # noqa C901: Complexity okay here
obj_ids.TMP1075_HANDLER_TCS_BRD_1_ID,
obj_ids.TMP1075_HANDLER_IF_BRD_ID,
obj_ids.TMP1075_HANDLER_PLPCDU_0_ID,
obj_ids.TMP1075_HANDLER_PLPCDU_1_ID,
]:
return handle_tmp_1075_hk_data(set_id=set_id, hk_data=hk_data, pw=pw)
elif objb == obj_ids.ACS_CONTROLLER:

View File

@ -13,6 +13,7 @@ from tmtccmd.tc.pus_200_fsfw_mode import Mode, create_announce_mode_recursive_co
from tmtccmd.tc.pus_3_fsfw_hk import (
make_sid,
generate_one_hk_command,
create_enable_periodic_hk_command_with_interval,
create_request_one_diag_command,
)
@ -21,6 +22,7 @@ class OpCodeSys:
OFF = ["off"]
NML = ["nml"]
REQUEST_PRIMARY_TEMP_SET = ["temp"]
ENABLE_TEMP_SET = "enable_temp_set"
REQUEST_DEVICE_TEMP_SET = ["temp_devs"]
REQUEST_DEVICE_SUS_SET = ["temp_sus"]
REQUEST_HEATER_INFO = "heater_info"
@ -30,6 +32,7 @@ class OpCodeSys:
class InfoSys:
OFF = "Switch TCS subsystem OFF"
NML = "Switch TCS subsystem NORMAL (nominal)"
ENABLE_TEMP_SET = "Enable Primary Temperature Set"
REQUEST_PRIMARY_TEMP_SET = "Request HK set of primary sensor temperatures"
REQUEST_DEVICE_TEMP_SET = "Request HK set of device sensor temperatures"
REQUEST_DEVICE_SUS_SET = "Request HK set of the SUS temperatures"
@ -67,6 +70,13 @@ def pack_tcs_sys_commands(q: DefaultPusQueueHelper, op_code: str):
if op_code in OpCodeSys.NML:
q.add_log_cmd(InfoSys.NML)
pack_mode_cmd_with_info(TCS_SUBSYSTEM_ID, Mode.NORMAL, 0, q, InfoSys.OFF)
if op_code == OpCodeSys.ENABLE_TEMP_SET:
interval_seconds = float(input("Please specify interval in seconds: "))
cmds = create_enable_periodic_hk_command_with_interval(
False, make_sid(TCS_CONTROLLER, CtrlSetId.PRIMARY_SENSORS), interval_seconds
)
for cmd in cmds:
q.add_pus_tc(cmd)
if op_code == OpCodeSys.ANNOUNCE_MODES:
q.add_log_cmd(InfoSys.ANNOUNCE_MODES)
q.add_pus_tc(create_announce_mode_recursive_command(TCS_SUBSYSTEM_ID))
@ -87,8 +97,9 @@ def add_tcs_subsystem_cmds(defs: TmtcDefinitionWrapper):
oce.add(keys=OpCodeSys.REQUEST_DEVICE_SUS_SET, info=InfoSys.REQUEST_DEVICE_SUS_SET)
oce.add(keys=OpCodeSys.REQUEST_HEATER_INFO, info=InfoSys.REQUEST_HEATER_INFO)
oce.add(keys=OpCodeSys.ANNOUNCE_MODES, info=InfoSys.ANNOUNCE_MODES)
oce.add(keys=OpCodeSys.ENABLE_TEMP_SET, info=InfoSys.ENABLE_TEMP_SET)
defs.add_service(
name=CustomServiceList.TCS,
info="TCS Board",
info="TCS",
op_code_entry=oce,
)