This commit is contained in:
2023-11-22 10:17:05 +01:00
parent 07b13c153d
commit b3920524ab
33 changed files with 731 additions and 616 deletions

View File

@ -36,7 +36,7 @@ from eive_tmtc.pus_tc.system.controllers import (
)
from eive_tmtc.tmtc.acs.acs_board import pack_acs_command
from eive_tmtc.tmtc.acs.sus_board import pack_sus_cmds
from eive_tmtc.tmtc.acs.imtq import pack_imtq_test_into, pack_dipole_command
from eive_tmtc.tmtc.acs.imtq import create_imtq_command, pack_dipole_command
from eive_tmtc.tmtc.acs.star_tracker import pack_star_tracker_commands
from eive_tmtc.tmtc.acs.reaction_wheels import pack_rw_ass_cmds, pack_set_speed_command
@ -312,7 +312,7 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
# Enable scheduling
q.add_pus_tc(create_enable_tc_sched_cmd())
# check whether tcs_assembly also has to be commanded to NORMAL Mode
pack_tcs_sys_commands(q=q, op_code=TcsOpCodes.TCS_BOARD_ASS_NORMAL[0])
pack_tcs_sys_commands(q=q, cmd_str=TcsOpCodes.TCS_BOARD_ASS_NORMAL[0])
pack_cmd_ctrl_to_nml(q=q, object_id=obj_id_dict.get(oids.THERMAL_CONTROLLER_ID))
if op_code in OpCode.TV_TEARDOWN_TCS_FT_OFF:
@ -337,7 +337,7 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
]
d_side_pairs = a_side_pairs + b_side_pairs
diag_list = [False, False, True, False, False]
pack_acs_command(q=q, op_code="acs-a")
pack_acs_command(q=q, cmd_str="acs-a")
for a_side_dev in a_side_pairs:
oid = a_side_dev[0]
@ -351,9 +351,9 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
cfg=GenericHkListeningCfg.default(),
)
pack_acs_command(q=q, op_code="acs-off")
pack_acs_command(q=q, cmd_str="acs-off")
q.add_wait_seconds(5.0)
pack_acs_command(q=q, op_code="acs-b")
pack_acs_command(q=q, cmd_str="acs-b")
sid_list.clear()
diag_list = [False, False, True, False, False]
@ -370,9 +370,9 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
cfg=GenericHkListeningCfg.default(),
)
pack_acs_command(q=q, op_code="acs-off")
pack_acs_command(q=q, cmd_str="acs-off")
q.add_wait_seconds(5.0)
pack_acs_command(q=q, op_code="acs-d")
pack_acs_command(q=q, cmd_str="acs-d")
sid_list.clear()
@ -400,7 +400,7 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
cfg=GenericHkListeningCfg.default(),
)
pack_acs_command(q=q, op_code="acs-off")
pack_acs_command(q=q, cmd_str="acs-off")
if op_code in OpCode.MGT_FT:
key = KAI.MGT_FT[0]
@ -416,10 +416,10 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
]
# Command MGT to mode on
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, q=q, op_code="1")
create_imtq_command(oids.IMTQ_HANDLER_ID, q=q, cmd_str="1")
q.add_wait_seconds(5.0)
# Command MGT to normal mode
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, q=q, op_code="2")
create_imtq_command(oids.IMTQ_HANDLER_ID, q=q, cmd_str="2")
for imtq_dev in imtq_pairs:
oid = imtq_dev[0]
@ -433,7 +433,7 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
cfg=GenericHkListeningCfg.default(),
)
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, q=q, op_code="0")
create_imtq_command(oids.IMTQ_HANDLER_ID, q=q, cmd_str="0")
if op_code in OpCode.MGT_FT_DP:
key = KAI.MGT_FT_DP[0]
@ -472,12 +472,12 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
True,
True,
]
pack_acs_command(q=q, op_code="acs-d")
pack_acs_command(q=q, cmd_str="acs-d")
# Command MGT to mode on
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, q=q, op_code="1")
create_imtq_command(oids.IMTQ_HANDLER_ID, q=q, cmd_str="1")
q.add_wait_seconds(20.0)
# Command MGT to normal mode
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, q=q, op_code="2")
create_imtq_command(oids.IMTQ_HANDLER_ID, q=q, cmd_str="2")
for d_side_and_imtq_dev in d_side_and_imtq_pairs:
oid = d_side_and_imtq_dev[0]
@ -494,8 +494,8 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
cfg=cfg,
)
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, q=q, op_code="0")
pack_acs_command(q=q, op_code="acs-off")
create_imtq_command(oids.IMTQ_HANDLER_ID, q=q, cmd_str="0")
pack_acs_command(q=q, cmd_str="acs-off")
if op_code in OpCode.SUS_FT:
key = KAI.SUS_FT[0]
@ -538,7 +538,7 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
cfg=GenericHkListeningCfg.default(),
)
pack_acs_command(q=q, op_code="sus-off")
pack_acs_command(q=q, cmd_str="sus-off")
q.add_wait_seconds(5.0)
pack_sus_cmds(q=q, op_code="sus-red")
@ -562,7 +562,7 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
cfg=GenericHkListeningCfg.default(),
)
pack_acs_command(q=q, op_code="sus-off")
pack_acs_command(q=q, cmd_str="sus-off")
q.add_wait_seconds(5.0)
pack_sus_cmds(q=q, op_code="sus-d")
@ -593,7 +593,7 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
cfg=GenericHkListeningCfg.default(),
)
pack_acs_command(q=q, op_code="sus-off")
pack_acs_command(q=q, cmd_str="sus-off")
if op_code in OpCode.SYRLINKS_FT:
key = KAI.SYRLINKS_FT[0]
@ -612,7 +612,7 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
if op_code in OpCode.STR_FT:
key = KAI.STR_FT[0]
pack_star_tracker_commands(object_id=oids.STAR_TRACKER_ID, q=q, op_code="2")
pack_star_tracker_commands(object_id=oids.STAR_TRACKER_ID, q=q, cmd_str="2")
# STR
sid_list.append(make_sid(oids.STAR_TRACKER_ID, StrSetIds.TEMPERATURE))
@ -625,7 +625,7 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
cfg=GenericHkListeningCfg.default(),
)
pack_star_tracker_commands(object_id=oids.STAR_TRACKER_ID, q=q, op_code="3")
pack_star_tracker_commands(object_id=oids.STAR_TRACKER_ID, q=q, cmd_str="3")
if op_code in OpCode.RW_FT_ONE_RW:
key = KAI.RW_FT_ONE_RW[0]
@ -658,7 +658,7 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
False,
]
# RW NORMAL
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, q=q, op_code="nml")
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, q=q, cmd_str="nml")
# RW HK für alle RWs nur einzeln
for rw_dev in rw_pairs:
@ -673,7 +673,7 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
cfg=GenericHkListeningCfg(mgt=False, one_rw=True, two_rws=False),
)
# RW OFF
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, q=q, op_code="off")
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, q=q, cmd_str="off")
# ass command with 2 rws to speed
if op_code in OpCode.RW_FT_TWO_RWS:
@ -715,7 +715,7 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
False,
]
# RW NORMAL
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, q=q, op_code="nml")
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, q=q, cmd_str="nml")
# RW
for rw_dev in rw_pairs:
@ -730,7 +730,7 @@ def pack_proc_commands( # noqa C901: Complexity is okay here.
cfg=GenericHkListeningCfg(mgt=False, one_rw=False, two_rws=True),
)
# RW OFF
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, q=q, op_code="off")
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, q=q, cmd_str="off")
def enable_listen_to_hk_for_x_seconds(