cleaned up PDU1 print commands
This commit is contained in:
parent
58da80cb9e
commit
f3a2e755fd
@ -136,31 +136,37 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
|||||||
Pdu1OpCodes.STAR_TRACKER_ON.value:
|
Pdu1OpCodes.STAR_TRACKER_ON.value:
|
||||||
("PDU1: Turn star tracker on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
("PDU1: Turn star tracker on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"2": ("PDU1: Get switch state of star tracker", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"2": ("PDU1: Get switch state of star tracker", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"3": ("PDU1: Turn SUS nominal on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
Pdu1OpCodes.SUS_NOMINAL_ON.value:
|
||||||
|
("PDU1: Turn SUS nominal on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
Pdu1OpCodes.STAR_TRACKER_OFF.value:
|
Pdu1OpCodes.STAR_TRACKER_OFF.value:
|
||||||
("PDU1: Turn star tracker off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
("PDU1: Turn star tracker off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"5": ("PDU1: Turn SUS nominal off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
Pdu1OpCodes.SUS_NOMINAL_OFF.value:
|
||||||
|
("PDU1: Turn SUS nominal off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
Pdu1OpCodes.ACS_A_SIDE_ON.value:
|
Pdu1OpCodes.ACS_A_SIDE_ON.value:
|
||||||
("PDU1: Turn ACS Side A on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
("PDU1: Turn ACS Side A on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
Pdu1OpCodes.ACS_A_SIDE_OFF.value:
|
Pdu1OpCodes.ACS_A_SIDE_OFF.value:
|
||||||
("PDU1: Turn ACS Side A off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
("PDU1: Turn ACS Side A off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
Pdu1OpCodes.PRINT_SWITCH_STATE.value:
|
PduOpCodes.PRINT_HK_TABLE.value:
|
||||||
("PDU1: Print switch states", {OpCodeDictKeys.TIMEOUT: 2.0})
|
("PDU1: Print Info", {OpCodeDictKeys.TIMEOUT: 2.0})
|
||||||
}
|
}
|
||||||
service_pdu1_tuple = ("PDU1 Device", op_code_dict_srv_pdu1)
|
service_pdu1_tuple = ("PDU1 Device", op_code_dict_srv_pdu1)
|
||||||
|
|
||||||
op_code_dict_srv_pdu2 = {
|
op_code_dict_srv_pdu2 = {
|
||||||
"0": ("PDU2 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"0": ("PDU2 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"1": ("PDU2: Turn ACS Side B on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
Pdu2OpCodes.ACS_SIDE_B_ON.value:
|
||||||
"2": ("PDU2: Turn ACS Side B off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
("PDU2: Turn ACS Side B on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"3": ("PDU2: Turn SUS redundant on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
Pdu2OpCodes.ACS_SIDE_B_OFF.value:
|
||||||
"4": ("PDU2: Turn SUS redundant off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
("PDU2: Turn ACS Side B off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"5": ("PDU2: Turn reaction wheels on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
Pdu2OpCodes.SUS_REDUNDANT_ON.value:
|
||||||
"6": ("PDU2: Turn reaction wheels off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
("PDU2: Turn SUS redundant on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
PduOpCodes.PRINT_ALL.value: ("PDU2: Print Info", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
Pdu2OpCodes.SUS_REDUNDANT_OFF.value:
|
||||||
PduOpCodes.PRINT_SWITCH_STATES.value: ("PDU2: Print Switch States", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
("PDU2: Turn SUS redundant off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
PduOpCodes.PRINT_CURRENTS.value: ("PDU2: Print Currents", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
Pdu2OpCodes.RW_ON.value:
|
||||||
PduOpCodes.PRINT_VOLTAGES.value: ("PDU2: Print Voltages", {OpCodeDictKeys.TIMEOUT: 2.0})
|
("PDU2: Turn reaction wheels on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
Pdu2OpCodes.RW_OFF.value:
|
||||||
|
("PDU2: Turn reaction wheels off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
PduOpCodes.PRINT_HK_TABLE.value:
|
||||||
|
("PDU1: Print Info", {OpCodeDictKeys.TIMEOUT: 2.0})
|
||||||
}
|
}
|
||||||
service_pdu2_tuple = ("PDU2 Device", op_code_dict_srv_pdu2)
|
service_pdu2_tuple = ("PDU2 Device", op_code_dict_srv_pdu2)
|
||||||
|
|
||||||
|
@ -19,17 +19,11 @@ class GomspaceDeviceActionIds(enum.IntEnum):
|
|||||||
PARAM_SET = 255
|
PARAM_SET = 255
|
||||||
WDT_RESET = 9
|
WDT_RESET = 9
|
||||||
REQUEST_HK_TABLE = 16
|
REQUEST_HK_TABLE = 16
|
||||||
PRINT_ALL = 32
|
PRINT_HK_TABLE = 32
|
||||||
PRINT_SWITCH_STATES = 33
|
|
||||||
PRINT_CURRENTS = 34
|
|
||||||
PRINT_VOLTAGES = 35
|
|
||||||
|
|
||||||
|
|
||||||
class PduOpCodes(enum.Enum):
|
class PduOpCodes(enum.Enum):
|
||||||
PRINT_ALL = "32"
|
PRINT_HK_TABLE = "32"
|
||||||
PRINT_SWITCH_STATES = "33"
|
|
||||||
PRINT_CURRENTS = "34"
|
|
||||||
PRINT_VOLTAGES = "35"
|
|
||||||
|
|
||||||
|
|
||||||
class TableIds:
|
class TableIds:
|
||||||
|
@ -20,7 +20,6 @@ class Pdu1OpCodes(enum.Enum):
|
|||||||
SUS_NOMINAL_OFF = "5"
|
SUS_NOMINAL_OFF = "5"
|
||||||
ACS_A_SIDE_ON = "6"
|
ACS_A_SIDE_ON = "6"
|
||||||
ACS_A_SIDE_OFF = "7"
|
ACS_A_SIDE_OFF = "7"
|
||||||
PRINT_SWITCH_STATE = "17"
|
|
||||||
|
|
||||||
|
|
||||||
class PDU1TestProcedure:
|
class PDU1TestProcedure:
|
||||||
@ -78,26 +77,26 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
|||||||
PDUConfigTable.out_en_7.parameter_size, Channel.off
|
PDUConfigTable.out_en_7.parameter_size, Channel.off
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == Pdu1OpCodes.PRINT_SWITCH_STATE.value:
|
if op_code == Pdu1OpCodes.SUS_NOMINAL_ON.value:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Print Switch Status"))
|
|
||||||
command = generate_action_command(
|
|
||||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_STATES
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "8":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal on"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal on"))
|
||||||
command = pack_set_param_command(
|
command = pack_set_param_command(
|
||||||
object_id, PDUConfigTable.out_en_4.parameter_address,
|
object_id, PDUConfigTable.out_en_4.parameter_address,
|
||||||
PDUConfigTable.out_en_4.parameter_size, Channel.on
|
PDUConfigTable.out_en_4.parameter_size, Channel.on
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "9":
|
if op_code == Pdu1OpCodes.SUS_NOMINAL_OFF.value:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal off"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal off"))
|
||||||
command = pack_set_param_command(
|
command = pack_set_param_command(
|
||||||
object_id, PDUConfigTable.out_en_4.parameter_address,
|
object_id, PDUConfigTable.out_en_4.parameter_address,
|
||||||
PDUConfigTable.out_en_4.parameter_size, Channel.off
|
PDUConfigTable.out_en_4.parameter_size, Channel.off
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
if op_code == PduOpCodes.PRINT_HK_TABLE.value:
|
||||||
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Info"))
|
||||||
|
command = generate_action_command(
|
||||||
|
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_HK_TABLE
|
||||||
|
)
|
||||||
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
|
||||||
if PDU1TestProcedure.all or PDU1TestProcedure.ping:
|
if PDU1TestProcedure.all or PDU1TestProcedure.ping:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Ping Test"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Ping Test"))
|
||||||
|
@ -84,28 +84,10 @@ def pack_pdu2_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -
|
|||||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
|
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||||
PDUConfigTable.out_en_2.parameter_size, Channel.off)
|
PDUConfigTable.out_en_2.parameter_size, Channel.off)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == PduOpCodes.PRINT_ALL.value:
|
if op_code == PduOpCodes.PRINT_HK_TABLE.value:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Info"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Info"))
|
||||||
command = generate_action_command(
|
command = generate_action_command(
|
||||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_ALL
|
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_HK_TABLE
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == PduOpCodes.PRINT_SWITCH_STATES.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Switch Status"))
|
|
||||||
command = generate_action_command(
|
|
||||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_STATES
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == PduOpCodes.PRINT_CURRENTS.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Currents"))
|
|
||||||
command = generate_action_command(
|
|
||||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_CURRENTS
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == PduOpCodes.PRINT_VOLTAGES.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Voltages"))
|
|
||||||
command = generate_action_command(
|
|
||||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_VOLTAGES
|
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user