added OpCode to request PDU1 HK
This commit is contained in:
parent
b6360b9c5c
commit
3f1ee29d1f
@ -200,7 +200,6 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
)
|
||||
|
||||
op_code_dict = dict()
|
||||
add_op_code_entry(op_code_dict=op_code_dict, keys="0", info="PDU1 Tests")
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu1OpCodes.TCS_BOARD_ON.value,
|
||||
@ -271,11 +270,17 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
keys=Pdu1OpCodes.SCEX_OFF.value,
|
||||
info="PDU1: Turn Solar Cell Experiment off",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu1OpCodes.REQUEST_HK_ONCE.value,
|
||||
info="PDU1: Request HK once"
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=GomspaceOpCodes.PRINT_SWITCH_V_I.value,
|
||||
info="PDU1: Print Switches, Voltages, Currents",
|
||||
)
|
||||
add_op_code_entry(op_code_dict=op_code_dict, keys=Pdu1OpCodes.TESTS.value, info="PDU1 Tests")
|
||||
add_service_op_code_entry(
|
||||
srv_op_code_dict=cmd_dict,
|
||||
name=CustomServiceList.PDU1.value,
|
||||
|
@ -5,27 +5,39 @@
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.tc.service_3_housekeeping import generate_one_hk_command, make_sid
|
||||
from gomspace.gomspace_common import *
|
||||
from gomspace.gomspace_pdu_definitions import *
|
||||
from config.object_ids import PDU_1_HANDLER_ID
|
||||
|
||||
|
||||
class Pdu1OpCodes(enum.Enum):
|
||||
TESTS = "0"
|
||||
TCS_BOARD_ON = "1"
|
||||
TCS_BOARD_OFF = "2"
|
||||
STAR_TRACKER_ON = "3"
|
||||
STAR_TRACKER_OFF = "4"
|
||||
SUS_NOMINAL_ON = "5"
|
||||
SUS_NOMINAL_OFF = "6"
|
||||
ACS_A_SIDE_ON = "7"
|
||||
ACS_A_SIDE_OFF = "8"
|
||||
SYRLINKS_ON = "9"
|
||||
SYRLINKS_OFF = "10"
|
||||
MGT_ON = "11"
|
||||
MGT_OFF = "12"
|
||||
TCS_BOARD_ON = "0"
|
||||
TCS_BOARD_OFF = "1"
|
||||
STAR_TRACKER_ON = "2"
|
||||
STAR_TRACKER_OFF = "3"
|
||||
SUS_NOMINAL_ON = "4"
|
||||
SUS_NOMINAL_OFF = "5"
|
||||
ACS_A_SIDE_ON = "6"
|
||||
ACS_A_SIDE_OFF = "7"
|
||||
SYRLINKS_ON = "8"
|
||||
SYRLINKS_OFF = "9"
|
||||
MGT_ON = "10"
|
||||
MGT_OFF = "11"
|
||||
# Solar Cell Experiment
|
||||
SCEX_ON = "13"
|
||||
SCEX_OFF = "14"
|
||||
SCEX_ON = "12"
|
||||
SCEX_OFF = "13"
|
||||
|
||||
# Request HK
|
||||
REQUEST_HK_ONCE = "16"
|
||||
TESTS = "32"
|
||||
|
||||
|
||||
class SetIds:
|
||||
PDU_1 = 0x01
|
||||
PDU_2 = 0x02
|
||||
P60_DOCK = 0x03
|
||||
ACU = 0x04
|
||||
|
||||
|
||||
class PDU1TestProcedure:
|
||||
@ -151,6 +163,11 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
Channel.off,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.REQUEST_HK_ONCE.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Requesting HK Table Once"))
|
||||
hk_sid = make_sid(object_id=PDU_1_HANDLER_ID, set_id=SetIds.PDU_1)
|
||||
command = generate_one_hk_command(sid=hk_sid, ssc=0)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "PDU1: Print Switches, Voltages, Currents")
|
||||
|
2
tmtccmd
2
tmtccmd
@ -1 +1 @@
|
||||
Subproject commit 47c69a0c945ae3f81bfadbff18a4521de03992bd
|
||||
Subproject commit 42e943108f42c8d51333f11f325e356791d460b1
|
Loading…
Reference in New Issue
Block a user