diff --git a/.idea/runConfigurations/PDU1_Commanding.xml b/.idea/runConfigurations/PDU1_Commanding.xml
index 76cde0b..d8b7855 100644
--- a/.idea/runConfigurations/PDU1_Commanding.xml
+++ b/.idea/runConfigurations/PDU1_Commanding.xml
@@ -6,9 +6,9 @@
-
+
-
+
diff --git a/.idea/runConfigurations/Syrlinks.xml b/.idea/runConfigurations/Syrlinks.xml
index a803f19..3e1f604 100644
--- a/.idea/runConfigurations/Syrlinks.xml
+++ b/.idea/runConfigurations/Syrlinks.xml
@@ -6,9 +6,9 @@
-
+
-
+
diff --git a/config/hook_implementations.py b/config/hook_implementations.py
index b200304..d2d00a0 100644
--- a/config/hook_implementations.py
+++ b/config/hook_implementations.py
@@ -155,7 +155,11 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
Pdu1OpCodes.ACS_A_SIDE_OFF.value:
("PDU1: Turn ACS Side A off", {OpCodeDictKeys.TIMEOUT: 2.0}),
GomspaceOpCodes.PRINT_SWITCH_V_I.value:
- ("PDU1: Print Switches, Voltages, Currents", {OpCodeDictKeys.TIMEOUT: 2.0})
+ ("PDU1: Print Switches, Voltages, Currents", {OpCodeDictKeys.TIMEOUT: 2.0}),
+ Pdu1OpCodes.SYRLINKS_ON.value:
+ ("PDU1: Turn Syrlinks on", {OpCodeDictKeys.TIMEOUT: 2.0}),
+ Pdu1OpCodes.SYRLINKS_OFF.value:
+ ("PDU1: Turn Syrlinks off", {OpCodeDictKeys.TIMEOUT: 2.0}),
}
service_pdu1_tuple = ("PDU1 Device", op_code_dict_srv_pdu1)
@@ -301,19 +305,20 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
op_code_dict_srv_pdec_handler = {
"0": ("PDEC Handler: Print CLCW", {OpCodeDictKeys.TIMEOUT: 2.0}),
+ "1": ("PDEC Handler: Print PDEC monitor", {OpCodeDictKeys.TIMEOUT: 2.0}),
}
service_pdec_handler_tuple = ("PDEC Handler", op_code_dict_srv_pdec_handler)
op_code_dict_srv_syrlinks_handler = {
- "0": ("syrlinks Handler: Set TX standby", {OpCodeDictKeys.TIMEOUT: 2.0}),
- "1": ("syrlinks Handler: Set TX modulation", {OpCodeDictKeys.TIMEOUT: 2.0}),
- "2": ("syrlinks Handler: Set TX carrier wave", {OpCodeDictKeys.TIMEOUT: 2.0}),
- "5": ("syrlinks Handler: Read TX status", {OpCodeDictKeys.TIMEOUT: 2.0}),
- "6": ("syrlinks Handler: Read TX waveform", {OpCodeDictKeys.TIMEOUT: 2.0}),
- "7": ("syrlinks Handler: Read TX AGC value high byte ", {OpCodeDictKeys.TIMEOUT: 2.0}),
- "8": ("syrlinks Handler: Read TX AGC value low byte ", {OpCodeDictKeys.TIMEOUT: 2.0})
+ "0": ("Syrlinks Handler: Set TX standby", {OpCodeDictKeys.TIMEOUT: 2.0}),
+ "1": ("Syrlinks Handler: Set TX modulation", {OpCodeDictKeys.TIMEOUT: 2.0}),
+ "2": ("Syrlinks Handler: Set TX carrier wave", {OpCodeDictKeys.TIMEOUT: 2.0}),
+ "5": ("Syrlinks Handler: Read TX status", {OpCodeDictKeys.TIMEOUT: 2.0}),
+ "6": ("Syrlinks Handler: Read TX waveform", {OpCodeDictKeys.TIMEOUT: 2.0}),
+ "7": ("Syrlinks Handler: Read TX AGC value high byte ", {OpCodeDictKeys.TIMEOUT: 2.0}),
+ "8": ("Syrlinks Handler: Read TX AGC value low byte ", {OpCodeDictKeys.TIMEOUT: 2.0})
}
- service_syrlinks_handler_tuple = ("PDEC Handler", op_code_dict_srv_syrlinks_handler)
+ service_syrlinks_handler_tuple = ("Syrlinks Handler", op_code_dict_srv_syrlinks_handler)
op_code_dict_srv_str_img_helper = {
"0": ("Star Tracker Image Helper: Upload image", {OpCodeDictKeys.TIMEOUT: 2.0}),
diff --git a/pus_tc/pdec_handler.py b/pus_tc/pdec_handler.py
index 73becf8..8e75b5e 100644
--- a/pus_tc/pdec_handler.py
+++ b/pus_tc/pdec_handler.py
@@ -12,7 +12,9 @@ from spacepackets.ecss.tc import PusTelecommand
class CommandIds:
# prints the clcw to the console. Useful for debugging
- PRINT_CLCW = bytearray([0x0, 0x0, 0x0, 0x0])
+ PRINT_CLCW = byteCrray([0x0, 0x0, 0x0, 0x0])
+ # Print PDEC monitor register
+ PRINT_PDEC_MON = bytearray([0x0, 0x0, 0x0, 0x1])
def pack_pdec_handler_test(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
@@ -25,4 +27,10 @@ def pack_pdec_handler_test(object_id: bytearray, tc_queue: TcQueueT, op_code: st
tc_queue.appendleft((QueueCommands.PRINT, "PDEC Handler: Print CLCW"))
command = object_id + CommandIds.PRINT_CLCW
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
+ tc_queue.appendleft(command.pack_command_tuple())
+
+ if op_code == "1":
+ tc_queue.appendleft((QueueCommands.PRINT, "PDEC Handler: Print PDEC monitor register"))
+ command = object_id + CommandIds.PRINT_PDEC_MON
+ command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
\ No newline at end of file
diff --git a/pus_tc/pdu1.py b/pus_tc/pdu1.py
index 906d3dd..670b23d 100644
--- a/pus_tc/pdu1.py
+++ b/pus_tc/pdu1.py
@@ -23,6 +23,8 @@ class Pdu1OpCodes(enum.Enum):
SUS_NOMINAL_OFF = "6"
ACS_A_SIDE_ON = "7"
ACS_A_SIDE_OFF = "8"
+ SYRLINKS_ON = "9"
+ SYRLINKS_OFF = "10"
class PDU1TestProcedure:
@@ -109,6 +111,20 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
)
tc_queue.appendleft(command.pack_command_tuple())
+ if op_code == Pdu1OpCodes.SYRLINKS_ON.value:
+ tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn Syrlinks on"))
+ command = pack_set_param_command(
+ object_id, PDUConfigTable.out_en_1.parameter_address,
+ PDUConfigTable.out_en_1.parameter_size, Channel.on
+ )
+ tc_queue.appendleft(command.pack_command_tuple())
+ if op_code == Pdu1OpCodes.SYRLINKS_OFF.value:
+ tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn Syrlinks off"))
+ command = pack_set_param_command(
+ object_id, PDUConfigTable.out_en_1.parameter_address,
+ PDUConfigTable.out_en_1.parameter_size, Channel.off
+ )
+ tc_queue.appendleft(command.pack_command_tuple())
if PDU1TestProcedure.all or PDU1TestProcedure.ping:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Ping Test"))