diff --git a/.idea/runConfigurations/S_A_Deployment_Test.xml b/.idea/runConfigurations/S_A_Deployment_Test.xml
index 6d21fe6..8b8caa3 100644
--- a/.idea/runConfigurations/S_A_Deployment_Test.xml
+++ b/.idea/runConfigurations/S_A_Deployment_Test.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/config/object_ids.py b/config/object_ids.py
index 35bc405..69b927f 100644
--- a/config/object_ids.py
+++ b/config/object_ids.py
@@ -15,7 +15,7 @@ __OBJECT_ID_DICT = None
# Core Object IDs
CORE_CONTROLLER_ID = bytes([0x43, 0x00, 0x00, 0x03])
-SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x10, 0xA2])
+SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x00, 0xA2])
# Power Object IDs
PCDU_HANDLER_ID = bytes([0x44, 0x20, 0x00, 0xA1])
diff --git a/pus_tc/cmd_definitions.py b/pus_tc/cmd_definitions.py
index e517b33..3e7c927 100644
--- a/pus_tc/cmd_definitions.py
+++ b/pus_tc/cmd_definitions.py
@@ -367,6 +367,16 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
keys=Pdu2OpCodes.TCS_HEATER_IN_OFF.value,
info="PDU2: Switch TCS Heater Input off",
)
+ add_op_code_entry(
+ op_code_dict=op_code_dict,
+ keys=Pdu2OpCodes.SOLAR_ARRAY_DEPL_ON.value,
+ info="PDU2: Switch Solar Array Deployment On",
+ )
+ add_op_code_entry(
+ op_code_dict=op_code_dict,
+ 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=GomspaceOpCodes.REQUEST_HK_ONCE.value,
diff --git a/pus_tc/devs/pdu2.py b/pus_tc/devs/pdu2.py
index 27b51eb..0b454ed 100644
--- a/pus_tc/devs/pdu2.py
+++ b/pus_tc/devs/pdu2.py
@@ -27,6 +27,8 @@ class Pdu2OpCodes(enum.Enum):
PL_PCDU_VBAT_RED_OFF = "10"
TCS_HEATER_IN_ON = "11"
TCS_HEATER_IN_OFF = "12"
+ SOLAR_ARRAY_DEPL_ON = "13"
+ SOLAR_ARRAY_DEPL_OFF = "14"
# There is not really a point of the on command, the SW can not be commanded if the OBC is off
Q7S_OFF = "32"
@@ -188,6 +190,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.SOLAR_ARRAY_DEPL_ON.value:
+ tc_queue.appendleft(
+ (QueueCommands.PRINT, "PDU2: Turn Solar Array Deployment 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 == Pdu2OpCodes.SOLAR_ARRAY_DEPL_OFF.value:
+ tc_queue.appendleft(
+ (QueueCommands.PRINT, "PDU2: Turn Solar Array Deployment 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.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/tc_packer_hook.py b/pus_tc/tc_packer_hook.py
index 340a8ac..01a253c 100644
--- a/pus_tc/tc_packer_hook.py
+++ b/pus_tc/tc_packer_hook.py
@@ -16,6 +16,7 @@ from pus_tc.devs.pdu2 import pack_pdu2_commands
from pus_tc.devs.pdu1 import pack_pdu1_commands
from pus_tc.devs.bpx_batt import pack_bpx_commands
from pus_tc.devs.acu import pack_acu_test_into
+from pus_tc.devs.solar_array_deployment import pack_solar_array_deployment_test_into
from pus_tc.devs.imtq import pack_imtq_test_into
from pus_tc.devs.tmp1075 import pack_tmp1075_test_into
from pus_tc.devs.ploc_mpsoc import pack_ploc_mpsoc_test_into
@@ -59,6 +60,7 @@ from config.object_ids import (
PDEC_HANDLER_ID,
STR_IMG_HELPER_ID,
SYRLINKS_HANDLER_ID,
+ SOLAR_ARRAY_DEPLOYMENT_ID,
)
@@ -193,6 +195,10 @@ def pack_service_queue_user(
return pack_syrlinks_command(
object_id=SYRLINKS_HANDLER_ID, tc_queue=service_queue, op_code=op_code
)
+ if service == CustomServiceList.SA_DEPLYOMENT.value:
+ return pack_solar_array_deployment_test_into(
+ object_id=SOLAR_ARRAY_DEPLOYMENT_ID, tc_queue=service_queue
+ )
if service == CustomServiceList.PL_PCDU.value:
return pack_pl_pcdu_commands(tc_queue=service_queue, op_code=op_code)
if service == CustomServiceList.ACS_ASS.value: