diff --git a/config/events.csv b/config/events.csv index b4f22cd..994e751 100644 --- a/config/events.csv +++ b/config/events.csv @@ -154,15 +154,27 @@ 12109;0x2f4d;ACK_INVALID_APID;LOW;Expected acknowledgement report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h 12110;0x2f4e;EXE_INVALID_APID;LOW;Expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h 12111;0x2f4f;MPSOC_HELPER_SEQ_CNT_MISMATCH;LOW;Received sequence count does not match expected sequence count P1: Expected sequence count P2: Received sequence count;linux/devices/ploc/PlocMPSoCHelper.h -12200;0x2fa8;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission/system/AcsBoardAssembly.h -12201;0x2fa9;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission/system/AcsBoardAssembly.h -12202;0x2faa;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission/system/AcsBoardAssembly.h -12203;0x2fab;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/AcsBoardAssembly.h -12300;0x300c;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission/system/SusAssembly.h -12301;0x300d;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission/system/SusAssembly.h -12302;0x300e;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission/system/SusAssembly.h -12303;0x300f;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/SusAssembly.h -12400;0x3070;CHILDREN_LOST_MODE;MEDIUM;;mission/system/TcsBoardAssembly.h +12200;0x2fa8;TRANSITION_BACK_TO_OFF;MEDIUM;Could not transition properly and went back to ALL OFF;mission/devices/PayloadPcduHandler.h +12201;0x2fa9;NEG_V_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h +12202;0x2faa;U_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h +12203;0x2fab;I_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h +12204;0x2fac;U_X8_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h +12205;0x2fad;I_X8_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h +12206;0x2fae;U_TX_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h +12207;0x2faf;I_TX_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h +12208;0x2fb0;U_MPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h +12209;0x2fb1;I_MPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h +12210;0x2fb2;U_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h +12211;0x2fb3;I_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h +12300;0x300c;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission/system/AcsBoardAssembly.h +12301;0x300d;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission/system/AcsBoardAssembly.h +12302;0x300e;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission/system/AcsBoardAssembly.h +12303;0x300f;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/AcsBoardAssembly.h +12400;0x3070;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission/system/SusAssembly.h +12401;0x3071;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission/system/SusAssembly.h +12402;0x3072;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission/system/SusAssembly.h +12403;0x3073;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/SusAssembly.h +12500;0x30d4;CHILDREN_LOST_MODE;MEDIUM;;mission/system/TcsBoardAssembly.h 13600;0x3520;ALLOC_FAILURE;MEDIUM;;bsp_q7s/core/CoreController.h 13601;0x3521;REBOOT_SW;MEDIUM; Software reboot occured. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h 13602;0x3522;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h diff --git a/pus_tc/cmd_definitions.py b/pus_tc/cmd_definitions.py index c6eb1a9..5dff327 100644 --- a/pus_tc/cmd_definitions.py +++ b/pus_tc/cmd_definitions.py @@ -387,6 +387,16 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT): keys=Pdu2OpCodes.SOLAR_ARRAY_DEPL_OFF.value, info="PDU2: Switch Solar Array Deployment Off", ) + add_op_code_entry( + op_code_dict=op_code_dict, + keys=Pdu2OpCodes.PL_CAMERA_ON.value, + info="PDU2: Turn payload camera on", + ) + add_op_code_entry( + op_code_dict=op_code_dict, + keys=Pdu2OpCodes.PL_CAMERA_OFF.value, + info="PDU2: Turn payload camera off", + ) add_op_code_entry( op_code_dict=op_code_dict, keys=GomspaceOpCodes.REQUEST_HK_ONCE.value, diff --git a/pus_tc/devs/pdu2.py b/pus_tc/devs/pdu2.py index 0b454ed..db800fa 100644 --- a/pus_tc/devs/pdu2.py +++ b/pus_tc/devs/pdu2.py @@ -29,6 +29,8 @@ class Pdu2OpCodes(enum.Enum): TCS_HEATER_IN_OFF = "12" SOLAR_ARRAY_DEPL_ON = "13" SOLAR_ARRAY_DEPL_OFF = "14" + PL_CAMERA_ON = "15" + PL_CAMERA_OFF = "16" # There is not really a point of the on command, the SW can not be commanded if the OBC is off Q7S_OFF = "32" @@ -212,6 +214,28 @@ def pack_pdu2_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str): Channel.off, ) tc_queue.appendleft(command.pack_command_tuple()) + if op_code == Pdu2OpCodes.PL_CAMERA_ON.value: + tc_queue.appendleft( + (QueueCommands.PRINT, "PDU2: Turn payload camera on") + ) + command = pack_set_param_command( + object_id, + PDUConfigTable.out_en_8.parameter_address, + PDUConfigTable.out_en_8.parameter_size, + Channel.on, + ) + tc_queue.appendleft(command.pack_command_tuple()) + if op_code == Pdu2OpCodes.PL_CAMERA_OFF.value: + tc_queue.appendleft( + (QueueCommands.PRINT, "PDU2: Turn payload camera off") + ) + command = pack_set_param_command( + object_id, + PDUConfigTable.out_en_8.parameter_address, + PDUConfigTable.out_en_8.parameter_size, + Channel.off, + ) + tc_queue.appendleft(command.pack_command_tuple()) if op_code == GomspaceOpCodes.REQUEST_HK_ONCE.value: tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Requesting HK Table Once")) hk_sid = make_sid(object_id=PDU_2_HANDLER_ID, set_id=SetIds.PDU_2) diff --git a/pus_tc/devs/ploc_mpsoc.py b/pus_tc/devs/ploc_mpsoc.py index 9f123c7..cf52a03 100644 --- a/pus_tc/devs/ploc_mpsoc.py +++ b/pus_tc/devs/ploc_mpsoc.py @@ -32,6 +32,7 @@ mpsoc_file_dict = { sequence_file_dict = { MANUAL_INPUT: ["manual input", ""], "2": ["0:/EM16/231", "0:/EM16/231"], + "3": ["0:/EQ04/E-75", "0:/EQ04/E-75"], } @@ -233,5 +234,5 @@ def get_sequence_file() -> str: if key == MANUAL_INPUT: file = input("Ploc MPSoC: Specify absolute name file: ") else: - file = mpsoc_file_dict[key][1] + file = sequence_file_dict[key][1] return file