apply black and add sus set ID

This commit is contained in:
Robin Müller 2022-05-25 11:10:57 +02:00
parent ebf44e8b0e
commit a107506b88
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
4 changed files with 161 additions and 77 deletions

View File

@ -117,7 +117,7 @@ SUS_3_N_LOC_XFYBZF_PT_YF = bytes([0x44, 0x12, 0x00, 0x35])
SUS_9_R_LOC_XBYBZB_PT_YF = bytes([0x44, 0x12, 0x00, 0x41]) SUS_9_R_LOC_XBYBZB_PT_YF = bytes([0x44, 0x12, 0x00, 0x41])
SUS_4_N_LOC_XMYFZF_PT_ZF = bytes([0x44, 0x12, 0x00, 0x36]) SUS_4_N_LOC_XMYFZF_PT_ZF = bytes([0x44, 0x12, 0x00, 0x36])
SUS_10_N_LOC_XMYBZF_PT_ZF = bytes([0x44, 0x12, 0x00, 0x42]) SUS_10_R_LOC_XMYBZF_PT_ZF = bytes([0x44, 0x12, 0x00, 0x42])
SUS_5_N_LOC_XFYMZB_PT_ZB = bytes([0x44, 0x12, 0x00, 0x37]) SUS_5_N_LOC_XFYMZB_PT_ZB = bytes([0x44, 0x12, 0x00, 0x37])
SUS_11_R_LOC_XBYMZB_PT_ZB = bytes([0x44, 0x12, 0x00, 0x43]) SUS_11_R_LOC_XBYMZB_PT_ZB = bytes([0x44, 0x12, 0x00, 0x43])

View File

@ -196,7 +196,9 @@ def pack_rw_ass_cmds(tc_queue: TcQueueT, object_id: bytes, op_code: str):
tc_queue.appendleft(cmd.pack_command_tuple()) tc_queue.appendleft(cmd.pack_command_tuple())
def pack_set_speed_command(object_id: bytes, speed: int, ramp_time: int) -> PusTelecommand: def pack_set_speed_command(
object_id: bytes, speed: int, ramp_time: int
) -> PusTelecommand:
"""With this function a command is packed to set the speed of a reaction wheel """With this function a command is packed to set the speed of a reaction wheel
:param object_id: The object id of the reaction wheel handler. :param object_id: The object id of the reaction wheel handler.
:param speed: Valid speeds are [-65000, -1000] and [1000, 65000]. Values are :param speed: Valid speeds are [-65000, -1000] and [1000, 65000]. Values are

2
pus_tc/devs/sus.py Normal file
View File

@ -0,0 +1,2 @@
class SetIds:
HK = 3

View File

@ -24,18 +24,7 @@ from pus_tc.devs.gyros import L3gGyroSetIds as GyroSetIds_1_3
from pus_tc.devs.gps import Gnss0SetIds as GnssSetIds_0 from pus_tc.devs.gps import Gnss0SetIds as GnssSetIds_0
from pus_tc.devs.gps import Gnss1SetIds as GnssSetIds_1 from pus_tc.devs.gps import Gnss1SetIds as GnssSetIds_1
from pus_tc.devs.imtq import ImtqSetIds from pus_tc.devs.imtq import ImtqSetIds
from pus_tc.devs.sus import Sus0SetIds from pus_tc.devs.sus import SetIds
from pus_tc.devs.sus import Sus1SetIds
from pus_tc.devs.sus import Sus2SetIds
from pus_tc.devs.sus import Sus3SetIds
from pus_tc.devs.sus import Sus4SetIds
from pus_tc.devs.sus import Sus5SetIds
from pus_tc.devs.sus import Sus6SetIds
from pus_tc.devs.sus import Sus7SetIds
from pus_tc.devs.sus import Sus8SetIds
from pus_tc.devs.sus import Sus9SetIds
from pus_tc.devs.sus import Sus10SetIds
from pus_tc.devs.sus import Sus11SetIds
from pus_tc.devs.star_tracker import SetIds as StrSetIds from pus_tc.devs.star_tracker import SetIds as StrSetIds
from pus_tc.devs.reaction_wheels import RwSetIds from pus_tc.devs.reaction_wheels import RwSetIds
@ -47,7 +36,6 @@ from pus_tc.devs.star_tracker import pack_star_tracker_commands
from pus_tc.devs.reaction_wheels import pack_rw_ass_cmds, pack_set_speed_command from pus_tc.devs.reaction_wheels import pack_rw_ass_cmds, pack_set_speed_command
class OpCodes: class OpCodes:
HEATER = ["0", "heater"] HEATER = ["0", "heater"]
BAT_FT = ["bat-ft"] BAT_FT = ["bat-ft"]
@ -93,13 +81,13 @@ PROC_INFO_DICT = {
KAI.TCS_FT_OFF[0]: [OpCodes.TCS_FT_OFF, KAI.TCS_FT_OFF[1], 120.0, 10.0], KAI.TCS_FT_OFF[0]: [OpCodes.TCS_FT_OFF, KAI.TCS_FT_OFF[1], 120.0, 10.0],
KAI.ACS_FT[0]: [OpCodes.ACS_FT, KAI.ACS_FT[1], 120.0, 10.0], KAI.ACS_FT[0]: [OpCodes.ACS_FT, KAI.ACS_FT[1], 120.0, 10.0],
KAI.MGT_FT[0]: [OpCodes.MGT_FT, KAI.MGT_FT[1], 120.0, 10.0], KAI.MGT_FT[0]: [OpCodes.MGT_FT, KAI.MGT_FT[1], 120.0, 10.0],
# collection_time for KAI.MGT_FT_DP maybe be reduced as a full 120seconds is not needed after MGTs are tested # collection_time for KAI.MGT_FT_DP maybe be reduced as a full 120seconds is not needed after MGTs are tested
KAI.MGT_FT_DP[0]: [OpCodes.MGT_FT_DP, KAI.MGT_FT_DP[1], 10.0, 10.0], KAI.MGT_FT_DP[0]: [OpCodes.MGT_FT_DP, KAI.MGT_FT_DP[1], 10.0, 10.0],
KAI.SUS_FT[0]: [OpCodes.SUS_FT, KAI.SUS_FT[1], 120.0, 10.0], KAI.SUS_FT[0]: [OpCodes.SUS_FT, KAI.SUS_FT[1], 120.0, 10.0],
KAI.STR_FT[0]: [OpCodes.STR_FT, KAI.STR_FT[1], 120.0, 10.0], KAI.STR_FT[0]: [OpCodes.STR_FT, KAI.STR_FT[1], 120.0, 10.0],
# collection_time for KAI.RW_FT_ONE_RW maybe be reduced as a full 120seconds is not needed after RWs are tested # collection_time for KAI.RW_FT_ONE_RW maybe be reduced as a full 120seconds is not needed after RWs are tested
KAI.RW_FT_ONE_RW[0]: [OpCodes.RW_FT_ONE_RW, KAI.RW_FT_ONE_RW[1], 10.0, 1.0], KAI.RW_FT_ONE_RW[0]: [OpCodes.RW_FT_ONE_RW, KAI.RW_FT_ONE_RW[1], 10.0, 1.0],
# collection_time for KAI.RW_FT_ONE_RW maybe be reduced as a full 120seconds is not needed after RWs are tested # collection_time for KAI.RW_FT_ONE_RW maybe be reduced as a full 120seconds is not needed after RWs are tested
KAI.RW_FT_ONE_RW[0]: [OpCodes.RW_FT_ONE_RW, KAI.RW_FT_ONE_RW[1], 10.0, 1.0], KAI.RW_FT_ONE_RW[0]: [OpCodes.RW_FT_ONE_RW, KAI.RW_FT_ONE_RW[1], 10.0, 1.0],
} }
@ -169,14 +157,26 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
key = KAI.BAT_FT[0] key = KAI.BAT_FT[0]
sid_list.append(make_sid(oids.BPX_HANDLER_ID, BpxSetIds.GET_HK_SET)) sid_list.append(make_sid(oids.BPX_HANDLER_ID, BpxSetIds.GET_HK_SET))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=False, one_rw=False, two_rws=False, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=False,
one_rw=False,
two_rws=False,
) )
if op_code in OpCodes.CORE_FT: if op_code in OpCodes.CORE_FT:
key = KAI.CORE_FT[0] key = KAI.CORE_FT[0]
sid_list.append(make_sid(oids.CORE_CONTROLLER_ID, CoreSetIds.HK)) sid_list.append(make_sid(oids.CORE_CONTROLLER_ID, CoreSetIds.HK))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=False, one_rw=False, two_rws=False, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=False,
one_rw=False,
two_rws=False,
) )
if op_code in OpCodes.PCDU_FT: if op_code in OpCodes.PCDU_FT:
@ -190,14 +190,26 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
sid_list.append(make_sid(oids.PDU_2_HANDLER_ID, GsSetIds.PDU_2_AUX)) sid_list.append(make_sid(oids.PDU_2_HANDLER_ID, GsSetIds.PDU_2_AUX))
sid_list.append(make_sid(oids.ACU_HANDLER_ID, GsSetIds.ACU_AUX)) sid_list.append(make_sid(oids.ACU_HANDLER_ID, GsSetIds.ACU_AUX))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=False, one_rw=False, two_rws=False, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=False,
one_rw=False,
two_rws=False,
) )
if op_code in OpCodes.RAD_SEN_FT: if op_code in OpCodes.RAD_SEN_FT:
key = KAI.RAD_SEN_FT[0] key = KAI.RAD_SEN_FT[0]
sid_list.append(make_sid(oids.RAD_SENSOR_ID, RadSetIds.RAD_SEN_CORE)) sid_list.append(make_sid(oids.RAD_SENSOR_ID, RadSetIds.RAD_SEN_CORE))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=False, one_rw=False, two_rws=False, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=False,
one_rw=False,
two_rws=False,
) )
if op_code in OpCodes.TCS_FT_ON: if op_code in OpCodes.TCS_FT_ON:
@ -225,7 +237,13 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
# GNSS0 # GNSS0
sid_list.append(make_sid(oids.GPS_HANDLER_0_ID, GnssSetIds_0.CORE_HK)) sid_list.append(make_sid(oids.GPS_HANDLER_0_ID, GnssSetIds_0.CORE_HK))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=False, one_rw=False, two_rws=False, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=False,
one_rw=False,
two_rws=False,
) )
pack_acs_command(tc_queue=tc_queue, op_code="acs-off") pack_acs_command(tc_queue=tc_queue, op_code="acs-off")
@ -242,7 +260,13 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
# GNSS1 # GNSS1
sid_list.append(make_sid(oids.GPS_HANDLER_1_ID, GnssSetIds_1.CORE_HK)) sid_list.append(make_sid(oids.GPS_HANDLER_1_ID, GnssSetIds_1.CORE_HK))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=False, one_rw=False, two_rws=False, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=False,
one_rw=False,
two_rws=False,
) )
pack_acs_command(tc_queue=tc_queue, op_code="acs-off") pack_acs_command(tc_queue=tc_queue, op_code="acs-off")
@ -265,7 +289,13 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
sid_list.append(make_sid(oids.GPS_HANDLER_0_ID, GnssSetIds_0.CORE_HK)) sid_list.append(make_sid(oids.GPS_HANDLER_0_ID, GnssSetIds_0.CORE_HK))
sid_list.append(make_sid(oids.GPS_HANDLER_1_ID, GnssSetIds_1.CORE_HK)) sid_list.append(make_sid(oids.GPS_HANDLER_1_ID, GnssSetIds_1.CORE_HK))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=False, one_rw=False, two_rws=False, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=False,
one_rw=False,
two_rws=False,
) )
pack_acs_command(tc_queue=tc_queue, op_code="acs-off") pack_acs_command(tc_queue=tc_queue, op_code="acs-off")
@ -273,14 +303,20 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
if op_code in OpCodes.MGT_FT: if op_code in OpCodes.MGT_FT:
key = KAI.MGT_FT[0] key = KAI.MGT_FT[0]
# mgt 1: imtq und hk # mgt 1: imtq und hk
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="2") pack_imtq_test_into(oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="2")
sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.ENG_HK_SET)) sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.ENG_HK_SET))
sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.CAL_MTM_SET)) sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.CAL_MTM_SET))
sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET)) sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=False, one_rw=False, two_rws=False, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=False,
one_rw=False,
two_rws=False,
) )
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="0") pack_imtq_test_into(oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="0")
@ -289,14 +325,22 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
key = KAI.MGT_FT_DP[0] key = KAI.MGT_FT_DP[0]
pack_acs_command(tc_queue=tc_queue, op_code="acs-d") pack_acs_command(tc_queue=tc_queue, op_code="acs-d")
# mgt 2.: imtq + dual side + dipole # mgt 2.: imtq + dual side + dipole
pack_imtq_test_into(object_id=oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="2") pack_imtq_test_into(
object_id=oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="2"
)
sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.ENG_HK_SET)) sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.ENG_HK_SET))
sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.CAL_MTM_SET)) sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.CAL_MTM_SET))
sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET)) sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=True, one_rw=False, two_rws=False, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=True,
one_rw=False,
two_rws=False,
) )
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="0") pack_imtq_test_into(oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="0")
@ -308,14 +352,20 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
pack_sus_cmds(tc_queue=tc_queue, op_code="sus-nom") pack_sus_cmds(tc_queue=tc_queue, op_code="sus-nom")
# SUSs # SUSs
sid_list.append(make_sid(oids.SUS_0_N_LOC_XFYFZM_PT_XF, Sus0SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_0_N_LOC_XFYFZM_PT_XF, SetIds.HK))
sid_list.append(make_sid(oids.SUS_1_N_LOC_XBYFZM_PT_XB, Sus1SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_1_N_LOC_XBYFZM_PT_XB, SetIds.HK))
sid_list.append(make_sid(oids.SUS_2_N_LOC_XFYBZB_PT_YB, Sus2SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_2_N_LOC_XFYBZB_PT_YB, SetIds.HK))
sid_list.append(make_sid(oids.SUS_3_N_LOC_XFYBZF_PT_YF, Sus3SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_3_N_LOC_XFYBZF_PT_YF, SetIds.HK))
sid_list.append(make_sid(oids.SUS_4_N_LOC_XMYFZF_PT_ZF, Sus4SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_4_N_LOC_XMYFZF_PT_ZF, SetIds.HK))
sid_list.append(make_sid(oids.SUS_5_N_LOC_XFYMZB_PT_ZB, Sus5SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_5_N_LOC_XFYMZB_PT_ZB, SetIds.HK))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=False, one_rw=False, two_rws=False, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=False,
one_rw=False,
two_rws=False,
) )
pack_acs_command(tc_queue=tc_queue, op_code="sus-off") pack_acs_command(tc_queue=tc_queue, op_code="sus-off")
@ -323,14 +373,20 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
pack_sus_cmds(tc_queue=tc_queue, op_code="sus-red") pack_sus_cmds(tc_queue=tc_queue, op_code="sus-red")
# SUSs # SUSs
sid_list.append(make_sid(oids.SUS_6_R_LOC_XFYBZM_PT_XF, Sus6SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_6_R_LOC_XFYBZM_PT_XF, SetIds.HK))
sid_list.append(make_sid(oids.SUS_7_R_LOC_XBYBZM_PT_XB, Sus7SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_7_R_LOC_XBYBZM_PT_XB, SetIds.HK))
sid_list.append(make_sid(oids.SUS_8_R_LOC_XBYBZB_PT_YB, Sus8SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_8_R_LOC_XBYBZB_PT_YB, SetIds.HK))
sid_list.append(make_sid(oids.SUS_9_R_LOC_XBYBZB_PT_YF, Sus9SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_9_R_LOC_XBYBZB_PT_YF, SetIds.HK))
sid_list.append(make_sid(oids.SUS_10_R_LOC_XMYBZF_PT_ZF, Sus10SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_10_R_LOC_XMYBZF_PT_ZF, SetIds.HK))
sid_list.append(make_sid(oids.SUS_11_R_LOC_XBYMZB_PT_ZB, Sus11SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_11_R_LOC_XBYMZB_PT_ZB, SetIds.HK))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=False, one_rw=False, two_rws=False, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=False,
one_rw=False,
two_rws=False,
) )
pack_acs_command(tc_queue=tc_queue, op_code="sus-off") pack_acs_command(tc_queue=tc_queue, op_code="sus-off")
@ -338,20 +394,26 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
pack_sus_cmds(tc_queue=tc_queue, op_code="sus-d") pack_sus_cmds(tc_queue=tc_queue, op_code="sus-d")
# SUSs # SUSs
sid_list.append(make_sid(oids.SUS_0_N_LOC_XFYFZM_PT_XF, Sus0SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_0_N_LOC_XFYFZM_PT_XF, SetIds.HK))
sid_list.append(make_sid(oids.SUS_1_N_LOC_XBYFZM_PT_XB, Sus1SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_1_N_LOC_XBYFZM_PT_XB, SetIds.HK))
sid_list.append(make_sid(oids.SUS_2_N_LOC_XFYBZB_PT_YB, Sus2SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_2_N_LOC_XFYBZB_PT_YB, SetIds.HK))
sid_list.append(make_sid(oids.SUS_3_N_LOC_XFYBZF_PT_YF, Sus3SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_3_N_LOC_XFYBZF_PT_YF, SetIds.HK))
sid_list.append(make_sid(oids.SUS_4_N_LOC_XMYFZF_PT_ZF, Sus4SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_4_N_LOC_XMYFZF_PT_ZF, SetIds.HK))
sid_list.append(make_sid(oids.SUS_5_N_LOC_XFYMZB_PT_ZB, Sus5SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_5_N_LOC_XFYMZB_PT_ZB, SetIds.HK))
sid_list.append(make_sid(oids.SUS_6_R_LOC_XFYBZM_PT_XF, Sus6SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_6_R_LOC_XFYBZM_PT_XF, SetIds.HK))
sid_list.append(make_sid(oids.SUS_7_R_LOC_XBYBZM_PT_XB, Sus7SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_7_R_LOC_XBYBZM_PT_XB, SetIds.HK))
sid_list.append(make_sid(oids.SUS_8_R_LOC_XBYBZB_PT_YB, Sus8SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_8_R_LOC_XBYBZB_PT_YB, SetIds.HK))
sid_list.append(make_sid(oids.SUS_9_R_LOC_XBYBZB_PT_YF, Sus9SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_9_R_LOC_XBYBZB_PT_YF, SetIds.HK))
sid_list.append(make_sid(oids.SUS_10_R_LOC_XMYBZF_PT_ZF, Sus10SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_10_R_LOC_XMYBZF_PT_ZF, SetIds.HK))
sid_list.append(make_sid(oids.SUS_11_R_LOC_XBYMZB_PT_ZB, Sus11SetIds.CORE_HK)) sid_list.append(make_sid(oids.SUS_11_R_LOC_XBYMZB_PT_ZB, SetIds.HK))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=False, one_rw=False, two_rws=False, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=False,
one_rw=False,
two_rws=False,
) )
pack_acs_command(tc_queue=tc_queue, op_code="sus-off") pack_acs_command(tc_queue=tc_queue, op_code="sus-off")
@ -359,19 +421,29 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
if op_code in OpCodes.STR_FT: if op_code in OpCodes.STR_FT:
key = KAI.STR_FT[0] key = KAI.STR_FT[0]
pack_star_tracker_commands(object_id=oids.STAR_TRACKER_ID, tc_queue=tc_queue, op_code="2") pack_star_tracker_commands(
object_id=oids.STAR_TRACKER_ID, tc_queue=tc_queue, op_code="2"
)
# STR # STR
sid_list.append(make_sid(oids.STAR_TRACKER_ID, StrSetIds.TEMPERATURE)) sid_list.append(make_sid(oids.STAR_TRACKER_ID, StrSetIds.TEMPERATURE))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=False, one_rw=False, two_rws=False, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=False,
one_rw=False,
two_rws=False,
) )
pack_star_tracker_commands(object_id=oids.STAR_TRACKER_ID, tc_queue=tc_queue, op_code="3") pack_star_tracker_commands(
object_id=oids.STAR_TRACKER_ID, tc_queue=tc_queue, op_code="3"
)
if op_code in OpCodes.RW_FT_ONE_RW: if op_code in OpCodes.RW_FT_ONE_RW:
key = KAI.RW_FT_ONE_RW[0] key = KAI.RW_FT_ONE_RW[0]
# RW NORMAL # RW NORMAL
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, tc_queue=tc_queue, op_code="nml") pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, tc_queue=tc_queue, op_code="nml")
# RW HK für alle RWs nur einzeln # RW HK für alle RWs nur einzeln
@ -393,15 +465,21 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
sid_list.append(make_sid(oids.RW4_ID, RwSetIds.TM_SET)) sid_list.append(make_sid(oids.RW4_ID, RwSetIds.TM_SET))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=False, one_rw=True, two_rws=False, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=False,
one_rw=True,
two_rws=False,
) )
# RW OFF # RW OFF
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, tc_queue=tc_queue, op_code="off") pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, tc_queue=tc_queue, op_code="off")
# ass command with 2 rws to speed # ass command with 2 rws to speed
if op_code in OpCodes.RW_FT_TWO_RWS: if op_code in OpCodes.RW_FT_TWO_RWS:
key = KAI.RW_FT_TWO_RWS[0] key = KAI.RW_FT_TWO_RWS[0]
# RW NORMAL # RW NORMAL
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, tc_queue=tc_queue, op_code="nml") pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, tc_queue=tc_queue, op_code="nml")
# RW # RW
@ -422,13 +500,18 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
sid_list.append(make_sid(oids.RW4_ID, RwSetIds.LAST_RESET)) sid_list.append(make_sid(oids.RW4_ID, RwSetIds.LAST_RESET))
sid_list.append(make_sid(oids.RW4_ID, RwSetIds.TM_SET)) sid_list.append(make_sid(oids.RW4_ID, RwSetIds.TM_SET))
pack_generic_hk_listening_cmds( pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, mgt=False, one_rw=False, two_rws=True, tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
mgt=False,
one_rw=False,
two_rws=True,
) )
# RW OFF # RW OFF
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, tc_queue=tc_queue, op_code="off") pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, tc_queue=tc_queue, op_code="off")
""" """
def listen_to_hk_for_x_seconds( def listen_to_hk_for_x_seconds(
tc_queue: TcQueueT, tc_queue: TcQueueT,
@ -550,9 +633,9 @@ def activate_mgts_alternately(
def activate_one_rw_in_sequence( def activate_one_rw_in_sequence(
tc_queue: TcQueueT, tc_queue: TcQueueT,
): ):
# RW1 speed cmd # RW1 speed cmd
tc_queue.appendleft((QueueCommands.WAIT, 5.0)) tc_queue.appendleft((QueueCommands.WAIT, 5.0))
command = pack_set_speed_command( command = pack_set_speed_command(
object_id=oids.RW1_ID, object_id=oids.RW1_ID,
@ -569,7 +652,7 @@ def activate_one_rw_in_sequence(
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
tc_queue.appendleft((QueueCommands.WAIT, 10.0)) tc_queue.appendleft((QueueCommands.WAIT, 10.0))
# RW2 speed cmd # RW2 speed cmd
command = pack_set_speed_command( command = pack_set_speed_command(
object_id=oids.RW2_ID, object_id=oids.RW2_ID,
speed=20000, speed=20000,
@ -585,7 +668,7 @@ def activate_one_rw_in_sequence(
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
tc_queue.appendleft((QueueCommands.WAIT, 10.0)) tc_queue.appendleft((QueueCommands.WAIT, 10.0))
# RW3 speed cmd # RW3 speed cmd
command = pack_set_speed_command( command = pack_set_speed_command(
object_id=oids.RW3_ID, object_id=oids.RW3_ID,
speed=20000, speed=20000,
@ -601,7 +684,7 @@ def activate_one_rw_in_sequence(
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
tc_queue.appendleft((QueueCommands.WAIT, 10.0)) tc_queue.appendleft((QueueCommands.WAIT, 10.0))
# RW4 speed cmd # RW4 speed cmd
command = pack_set_speed_command( command = pack_set_speed_command(
object_id=oids.RW4_ID, object_id=oids.RW4_ID,
speed=20000, speed=20000,
@ -618,9 +701,7 @@ def activate_one_rw_in_sequence(
tc_queue.appendleft((QueueCommands.WAIT, 5.0)) tc_queue.appendleft((QueueCommands.WAIT, 5.0))
def activate_two_rws_in_sequence( def activate_two_rws_in_sequence(tc_queue: TcQueueT):
tc_queue: TcQueueT
):
# RW1+3 speed cmd # RW1+3 speed cmd
tc_queue.appendleft((QueueCommands.WAIT, 5.0)) tc_queue.appendleft((QueueCommands.WAIT, 5.0))
command = pack_set_speed_command( command = pack_set_speed_command(
@ -676,4 +757,3 @@ def activate_two_rws_in_sequence(
) )
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
tc_queue.appendleft((QueueCommands.WAIT, 5.0)) tc_queue.appendleft((QueueCommands.WAIT, 5.0))