star tracker on command
This commit is contained in:
parent
cc6dbd8ef9
commit
0c99bc9d11
@ -6,9 +6,9 @@
|
|||||||
<envs>
|
<envs>
|
||||||
<env name="PYTHONUNBUFFERED" value="1" />
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
</envs>
|
</envs>
|
||||||
<option name="SDK_HOME" value="" />
|
<option name="SDK_HOME" value="C:\Users\jakob\AppData\Local\Programs\Python\Python39\python.exe" />
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
<option name="IS_MODULE_SDK" value="true" />
|
<option name="IS_MODULE_SDK" value="false" />
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
@ -52,6 +52,7 @@ class EiveHookObject(TmTcHookBase):
|
|||||||
|
|
||||||
op_code_dict_srv_pdu1 = {
|
op_code_dict_srv_pdu1 = {
|
||||||
"0": ("PDU1 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"0": ("PDU1 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
"1": ("PDU1: Turn star tracker on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
}
|
}
|
||||||
service_pdu1_tuple = ("PDU1 Device", op_code_dict_srv_pdu1)
|
service_pdu1_tuple = ("PDU1 Device", op_code_dict_srv_pdu1)
|
||||||
|
|
||||||
@ -151,7 +152,7 @@ class EiveHookObject(TmTcHookBase):
|
|||||||
|
|
||||||
service_op_code_dict[CustomServiceList.P60DOCK.value] = service_p60_tuple
|
service_op_code_dict[CustomServiceList.P60DOCK.value] = service_p60_tuple
|
||||||
service_op_code_dict[CustomServiceList.PDU1.value] = service_pdu1_tuple
|
service_op_code_dict[CustomServiceList.PDU1.value] = service_pdu1_tuple
|
||||||
service_op_code_dict[CustomServiceList.PDU1.value] = service_pdu2_tuple
|
service_op_code_dict[CustomServiceList.PDU2.value] = service_pdu2_tuple
|
||||||
service_op_code_dict[CustomServiceList.HEATER.value] = service_heater_tuple
|
service_op_code_dict[CustomServiceList.HEATER.value] = service_heater_tuple
|
||||||
service_op_code_dict[CustomServiceList.IMTQ.value] = service_imtq_tuple
|
service_op_code_dict[CustomServiceList.IMTQ.value] = service_imtq_tuple
|
||||||
service_op_code_dict[CustomServiceList.REACTION_WHEEL_1.value] = service_rw_tuple
|
service_op_code_dict[CustomServiceList.REACTION_WHEEL_1.value] = service_rw_tuple
|
||||||
|
@ -30,46 +30,51 @@ class PDU1TestProcedure:
|
|||||||
turn_channel_3_off = True
|
turn_channel_3_off = True
|
||||||
|
|
||||||
|
|
||||||
def pack_pdu1_test_into(
|
def pack_pdu1_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||||
pdu1_object_id: bytearray, p60dock_object_id: bytearray, tc_queue: TcQueueT
|
tc_queue.appendleft((QueueCommands.PRINT, "Commanding PDU1"))
|
||||||
):
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing PDU1"))
|
if op_code == 1:
|
||||||
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn star tracker on"))
|
||||||
|
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||||
|
PDUConfigTable.out_en_2.parameter_size, Channel.on)
|
||||||
|
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
||||||
|
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"))
|
||||||
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
||||||
command = pack_ping_command(pdu1_object_id, ping_data)
|
command = pack_ping_command(object_id, ping_data)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if PDU1TestProcedure.all or PDU1TestProcedure.read_temperature:
|
if PDU1TestProcedure.all or PDU1TestProcedure.read_temperature:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Testing temperature reading"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Testing temperature reading"))
|
||||||
command = pack_get_param_command(
|
command = pack_get_param_command(
|
||||||
pdu1_object_id, TableIds.hk, PDUHkTable.temperature.parameter_address,
|
object_id, TableIds.hk, PDUHkTable.temperature.parameter_address,
|
||||||
PDUHkTable.temperature.parameter_size
|
PDUHkTable.temperature.parameter_size
|
||||||
)
|
)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_2_on:
|
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_2_on:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 2 on (Star Tracker)"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 2 on (Star Tracker)"))
|
||||||
command = pack_set_param_command(pdu1_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.on)
|
PDUConfigTable.out_en_2.parameter_size, Channel.on)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_2_off:
|
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_2_off:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 2 off (Star Tracker)"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 2 off (Star Tracker)"))
|
||||||
command = pack_set_param_command(pdu1_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)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_3_on:
|
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_3_on:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 3 on (MTQ)"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 3 on (MTQ)"))
|
||||||
command = pack_set_param_command(pdu1_object_id, PDUConfigTable.out_en_3.parameter_address,
|
command = pack_set_param_command(object_id, PDUConfigTable.out_en_3.parameter_address,
|
||||||
PDUConfigTable.out_en_3.parameter_size, Channel.on)
|
PDUConfigTable.out_en_3.parameter_size, Channel.on)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_3_off:
|
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_3_off:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 3 off (MTQ)"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 3 off (MTQ)"))
|
||||||
command = pack_set_param_command(pdu1_object_id, PDUConfigTable.out_en_3.parameter_address,
|
command = pack_set_param_command(object_id, PDUConfigTable.out_en_3.parameter_address,
|
||||||
PDUConfigTable.out_en_3.parameter_size, Channel.off)
|
PDUConfigTable.out_en_3.parameter_size, Channel.off)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
@ -48,11 +48,8 @@ def pack_service_queue_user(service: Union[str, int], op_code: str, service_queu
|
|||||||
object_id = P60_DOCK_HANDLER
|
object_id = P60_DOCK_HANDLER
|
||||||
return pack_p60dock_test_into(object_id=object_id, tc_queue=service_queue)
|
return pack_p60dock_test_into(object_id=object_id, tc_queue=service_queue)
|
||||||
if service == CustomServiceList.PDU1.value:
|
if service == CustomServiceList.PDU1.value:
|
||||||
pdu1_object_id = PDU_1_HANDLER_ID
|
object_id = PDU_1_HANDLER_ID
|
||||||
p60dock_object_id = P60_DOCK_HANDLER
|
return pack_pdu1_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code)
|
||||||
return pack_pdu1_test_into(
|
|
||||||
pdu1_object_id=pdu1_object_id, p60dock_object_id=p60dock_object_id, tc_queue=service_queue
|
|
||||||
)
|
|
||||||
if service == CustomServiceList.PDU2.value:
|
if service == CustomServiceList.PDU2.value:
|
||||||
pdu2_object_id = PDU_2_HANDLER_ID
|
pdu2_object_id = PDU_2_HANDLER_ID
|
||||||
p60dock_object_id = P60_DOCK_HANDLER
|
p60dock_object_id = P60_DOCK_HANDLER
|
||||||
|
Loading…
Reference in New Issue
Block a user