some improvements when testing SA Deply
This commit is contained in:
parent
36b53098c0
commit
85ccf4082c
@ -13,7 +13,7 @@
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
||||
<option name="PARAMETERS" value="-s sa_depl -l" />
|
||||
<option name="PARAMETERS" value="-s sa_depl -o 0 -l" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="true" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
|
@ -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])
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user