add commands to switch on/off scex
This commit is contained in:
parent
84c2730836
commit
e7d735966a
@ -91,63 +91,89 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
|||||||
op_code_entry=op_code_dict,
|
op_code_entry=op_code_dict,
|
||||||
)
|
)
|
||||||
|
|
||||||
op_code_dict_srv_pdu1 = {
|
op_code_dict = dict()
|
||||||
"0": ("PDU1 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
add_op_code_entry(op_code_dict=op_code_dict, keys="0", info="PDU1 Tests")
|
||||||
Pdu1OpCodes.TCS_BOARD_ON.value: (
|
add_op_code_entry(
|
||||||
"PDU1: Turn TCS board on",
|
op_code_dict=op_code_dict,
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
keys=Pdu1OpCodes.TCS_BOARD_ON.value,
|
||||||
),
|
info="PDU1: Turn TCS board on",
|
||||||
Pdu1OpCodes.TCS_BOARD_OFF.value: (
|
)
|
||||||
"PDU1: Turn TCS board off",
|
add_op_code_entry(
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
op_code_dict=op_code_dict,
|
||||||
),
|
keys=Pdu1OpCodes.TCS_BOARD_OFF.value,
|
||||||
Pdu1OpCodes.STAR_TRACKER_ON.value: (
|
info="PDU1: Turn TCS board off",
|
||||||
"PDU1: Turn star tracker on",
|
)
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
add_op_code_entry(
|
||||||
),
|
op_code_dict=op_code_dict,
|
||||||
Pdu1OpCodes.STAR_TRACKER_OFF.value: (
|
keys=Pdu1OpCodes.STAR_TRACKER_ON.value,
|
||||||
"PDU1: Turn star tracker off",
|
info="PDU1: Turn star tracker on",
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
)
|
||||||
),
|
add_op_code_entry(
|
||||||
Pdu1OpCodes.SUS_NOMINAL_ON.value: (
|
op_code_dict=op_code_dict,
|
||||||
"PDU1: Turn SUS nominal on",
|
keys=Pdu1OpCodes.STAR_TRACKER_OFF.value,
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
info="PDU1: Turn star tracker off",
|
||||||
),
|
)
|
||||||
Pdu1OpCodes.SUS_NOMINAL_OFF.value: (
|
add_op_code_entry(
|
||||||
"PDU1: Turn SUS nominal off",
|
op_code_dict=op_code_dict,
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
keys=Pdu1OpCodes.SUS_NOMINAL_ON.value,
|
||||||
),
|
info="PDU1: Turn SUS nominal on",
|
||||||
Pdu1OpCodes.ACS_A_SIDE_ON.value: (
|
)
|
||||||
"PDU1: Turn ACS Side A on",
|
add_op_code_entry(
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
op_code_dict=op_code_dict,
|
||||||
),
|
keys=Pdu1OpCodes.SUS_NOMINAL_OFF.value,
|
||||||
Pdu1OpCodes.ACS_A_SIDE_OFF.value: (
|
info="PDU1: Turn SUS nominal off",
|
||||||
"PDU1: Turn ACS Side A off",
|
)
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
add_op_code_entry(
|
||||||
),
|
op_code_dict=op_code_dict,
|
||||||
Pdu1OpCodes.SYRLINKS_ON.value: (
|
keys=Pdu1OpCodes.ACS_A_SIDE_ON.value,
|
||||||
"PDU1: Turn Syrlinks on",
|
info="PDU1: Turn ACS A side on",
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
)
|
||||||
),
|
add_op_code_entry(
|
||||||
Pdu1OpCodes.SYRLINKS_OFF.value: (
|
op_code_dict=op_code_dict,
|
||||||
"PDU1: Turn Syrlinks off",
|
keys=Pdu1OpCodes.ACS_A_SIDE_OFF.value,
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
info="PDU1: Turn ACS A side off",
|
||||||
),
|
)
|
||||||
Pdu1OpCodes.MGT_ON.value: (
|
add_op_code_entry(
|
||||||
"PDU1: Turn MGT on",
|
op_code_dict=op_code_dict,
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
keys=Pdu1OpCodes.SYRLINKS_ON.value,
|
||||||
),
|
info="PDU1: Turn Syrlinks on",
|
||||||
Pdu1OpCodes.MGT_OFF.value: (
|
)
|
||||||
"PDU1: Turn MGT off",
|
add_op_code_entry(
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
op_code_dict=op_code_dict,
|
||||||
),
|
keys=Pdu1OpCodes.SYRLINKS_OFF.value,
|
||||||
GomspaceOpCodes.PRINT_SWITCH_V_I.value: (
|
info="PDU1: Turn Syrlinks off",
|
||||||
"PDU1: Print Switches, Voltages, Currents",
|
)
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
add_op_code_entry(
|
||||||
),
|
op_code_dict=op_code_dict,
|
||||||
}
|
keys=Pdu1OpCodes.MGT_ON.value,
|
||||||
service_pdu1_tuple = ("PDU1 Device", op_code_dict_srv_pdu1)
|
info="PDU1: Turn MGT on",
|
||||||
cmd_dict[CustomServiceList.PDU1.value] = service_pdu1_tuple
|
)
|
||||||
|
add_op_code_entry(
|
||||||
|
op_code_dict=op_code_dict,
|
||||||
|
keys=Pdu1OpCodes.MGT_OFF.value,
|
||||||
|
info="PDU1: Turn MGT on",
|
||||||
|
)
|
||||||
|
add_op_code_entry(
|
||||||
|
op_code_dict=op_code_dict,
|
||||||
|
keys=Pdu1OpCodes.SCEX_ON.value,
|
||||||
|
info="PDU1: Turn Solar Cell Experiment on",
|
||||||
|
)
|
||||||
|
add_op_code_entry(
|
||||||
|
op_code_dict=op_code_dict,
|
||||||
|
keys=Pdu1OpCodes.SCEX_OFF.value,
|
||||||
|
info="PDU1: Turn Solar Cell Experiment off",
|
||||||
|
)
|
||||||
|
add_op_code_entry(
|
||||||
|
op_code_dict=op_code_dict,
|
||||||
|
keys=GomspaceOpCodes.PRINT_SWITCH_V_I.value,
|
||||||
|
info="PDU1: Print Switches, Voltages, Currents",
|
||||||
|
)
|
||||||
|
add_service_op_code_entry(
|
||||||
|
srv_op_code_dict=cmd_dict,
|
||||||
|
name=CustomServiceList.PDU1.value,
|
||||||
|
info="PDU1 Device",
|
||||||
|
op_code_entry=op_code_dict,
|
||||||
|
)
|
||||||
|
|
||||||
op_code_dict = dict()
|
op_code_dict = dict()
|
||||||
add_op_code_entry(
|
add_op_code_entry(
|
||||||
|
@ -27,6 +27,9 @@ class Pdu1OpCodes(enum.Enum):
|
|||||||
SYRLINKS_OFF = "10"
|
SYRLINKS_OFF = "10"
|
||||||
MGT_ON = "11"
|
MGT_ON = "11"
|
||||||
MGT_OFF = "12"
|
MGT_OFF = "12"
|
||||||
|
# Solar Cell Experiment
|
||||||
|
SCEX_ON = "13"
|
||||||
|
SCEX_OFF = "14"
|
||||||
|
|
||||||
|
|
||||||
class PDU1TestProcedure:
|
class PDU1TestProcedure:
|
||||||
@ -130,6 +133,24 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
|||||||
Channel.off,
|
Channel.off,
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
if op_code == Pdu1OpCodes.SCEX_ON.value:
|
||||||
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn Solar Cell Experiment on"))
|
||||||
|
command = pack_set_param_command(
|
||||||
|
object_id,
|
||||||
|
PDUConfigTable.out_en_5.parameter_address,
|
||||||
|
PDUConfigTable.out_en_5.parameter_size,
|
||||||
|
Channel.on,
|
||||||
|
)
|
||||||
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
if op_code == Pdu1OpCodes.SCEX_OFF.value:
|
||||||
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn Solar Cell Experiment off"))
|
||||||
|
command = pack_set_param_command(
|
||||||
|
object_id,
|
||||||
|
PDUConfigTable.out_en_5.parameter_address,
|
||||||
|
PDUConfigTable.out_en_5.parameter_size,
|
||||||
|
Channel.off,
|
||||||
|
)
|
||||||
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||||
tc_queue.appendleft(
|
tc_queue.appendleft(
|
||||||
(QueueCommands.PRINT, "PDU1: Print Switches, Voltages, Currents")
|
(QueueCommands.PRINT, "PDU1: Print Switches, Voltages, Currents")
|
||||||
|
Loading…
Reference in New Issue
Block a user