updated pl pcdu commands
This commit is contained in:
parent
a39c7007c6
commit
8b5554d6fd
@ -134,9 +134,7 @@ def add_pl_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
|||||||
info=Info.NORMAL_HPA,
|
info=Info.NORMAL_HPA,
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
add_op_code_entry(
|
||||||
op_code_dict=op_code_dict,
|
op_code_dict=op_code_dict, keys=OpCodes.SWITCH_OFF, info=Info.SWITCH_OFF
|
||||||
keys=OpCodes.SWITCH_OFF,
|
|
||||||
info=Info.SWITCH_OFF
|
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
add_op_code_entry(
|
||||||
op_code_dict=op_code_dict,
|
op_code_dict=op_code_dict,
|
||||||
|
@ -215,9 +215,7 @@ def pack_pdu2_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
|||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == Pdu2OpCodes.PL_CAMERA_ON.value:
|
if op_code == Pdu2OpCodes.PL_CAMERA_ON.value:
|
||||||
tc_queue.appendleft(
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn payload camera on"))
|
||||||
(QueueCommands.PRINT, "PDU2: Turn payload camera on")
|
|
||||||
)
|
|
||||||
command = pack_set_param_command(
|
command = pack_set_param_command(
|
||||||
object_id,
|
object_id,
|
||||||
PDUConfigTable.out_en_8.parameter_address,
|
PDUConfigTable.out_en_8.parameter_address,
|
||||||
@ -226,9 +224,7 @@ def pack_pdu2_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
|||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == Pdu2OpCodes.PL_CAMERA_OFF.value:
|
if op_code == Pdu2OpCodes.PL_CAMERA_OFF.value:
|
||||||
tc_queue.appendleft(
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn payload camera off"))
|
||||||
(QueueCommands.PRINT, "PDU2: Turn payload camera off")
|
|
||||||
)
|
|
||||||
command = pack_set_param_command(
|
command = pack_set_param_command(
|
||||||
object_id,
|
object_id,
|
||||||
PDUConfigTable.out_en_8.parameter_address,
|
PDUConfigTable.out_en_8.parameter_address,
|
||||||
|
@ -70,16 +70,12 @@ def pack_ploc_mpsoc_commands(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if op_code == "0":
|
if op_code == "0":
|
||||||
tc_queue.appendleft(
|
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Set mode off"))
|
||||||
(QueueCommands.PRINT, "PLOC MPSoC: Set mode off")
|
|
||||||
)
|
|
||||||
command = pack_mode_data(object_id, Modes.OFF, 0)
|
command = pack_mode_data(object_id, Modes.OFF, 0)
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=9, app_data=command)
|
command = PusTelecommand(service=200, subservice=1, ssc=9, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "1":
|
if op_code == "1":
|
||||||
tc_queue.appendleft(
|
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Set mode on"))
|
||||||
(QueueCommands.PRINT, "PLOC MPSoC: Set mode on")
|
|
||||||
)
|
|
||||||
command = pack_mode_data(object_id, Modes.ON, 0)
|
command = pack_mode_data(object_id, Modes.ON, 0)
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=10, app_data=command)
|
command = PusTelecommand(service=200, subservice=1, ssc=10, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
@ -142,8 +138,10 @@ def pack_ploc_mpsoc_commands(
|
|||||||
command = PusTelecommand(service=8, subservice=128, ssc=27, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=27, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "12":
|
elif op_code == "12":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Reset OBSW sequence count"))
|
tc_queue.appendleft(
|
||||||
command = object_id + struct.pack('!I', CommandIds.OBSW_RESET_SEQ_COUNT)
|
(QueueCommands.PRINT, "PLOC MPSoC: Reset OBSW sequence count")
|
||||||
|
)
|
||||||
|
command = object_id + struct.pack("!I", CommandIds.OBSW_RESET_SEQ_COUNT)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
elif op_code == "13":
|
elif op_code == "13":
|
||||||
|
@ -52,14 +52,13 @@ class Info:
|
|||||||
NORMAL_HPA = f"{NORMAL}, HPA on"
|
NORMAL_HPA = f"{NORMAL}, HPA on"
|
||||||
|
|
||||||
|
|
||||||
class NormalSubmodes(enum.IntEnum):
|
class NormalSubmodesMask(enum.IntEnum):
|
||||||
ALL_OFF = 0
|
SOLID_STATE_RELAYS_ADC_ON = 0
|
||||||
SOLID_STATE_RELAYS_ADC_ON = 1
|
DRO_ON = 1
|
||||||
DRO_ON = 2
|
X8_ON = 2
|
||||||
X8_ON = 3
|
TX_ON = 3
|
||||||
TX_ON = 4
|
MPA_ON = 4
|
||||||
MPA_ON = 5
|
HPA_ON = 5
|
||||||
HPA_ON = 6
|
|
||||||
|
|
||||||
|
|
||||||
class ParamIds(enum.IntEnum):
|
class ParamIds(enum.IntEnum):
|
||||||
@ -114,42 +113,67 @@ def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
|||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
info=Info.NORMAL_SSR,
|
info=Info.NORMAL_SSR,
|
||||||
mode=Modes.NORMAL,
|
mode=Modes.NORMAL,
|
||||||
submode=NormalSubmodes.SOLID_STATE_RELAYS_ADC_ON,
|
submode=(1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON),
|
||||||
)
|
)
|
||||||
if op_code in OpCodes.NORMAL_DRO:
|
if op_code in OpCodes.NORMAL_DRO:
|
||||||
pack_pl_pcdu_mode_cmd(
|
pack_pl_pcdu_mode_cmd(
|
||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
info=Info.NORMAL_DRO,
|
info=Info.NORMAL_DRO,
|
||||||
mode=Modes.NORMAL,
|
mode=Modes.NORMAL,
|
||||||
submode=NormalSubmodes.DRO_ON,
|
submode=(
|
||||||
|
1 << NormalSubmodesMask.DRO_ON
|
||||||
|
| (1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON)
|
||||||
|
),
|
||||||
)
|
)
|
||||||
if op_code in OpCodes.NORMAL_X8:
|
if op_code in OpCodes.NORMAL_X8:
|
||||||
pack_pl_pcdu_mode_cmd(
|
pack_pl_pcdu_mode_cmd(
|
||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
info=Info.NORMAL_X8,
|
info=Info.NORMAL_X8,
|
||||||
mode=Modes.NORMAL,
|
mode=Modes.NORMAL,
|
||||||
submode=NormalSubmodes.X8_ON,
|
submode=(
|
||||||
|
1 << NormalSubmodesMask.DRO_ON
|
||||||
|
| (1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON)
|
||||||
|
| (1 << NormalSubmodesMask.X8_ON)
|
||||||
|
),
|
||||||
)
|
)
|
||||||
if op_code in OpCodes.NORMAL_TX:
|
if op_code in OpCodes.NORMAL_TX:
|
||||||
pack_pl_pcdu_mode_cmd(
|
pack_pl_pcdu_mode_cmd(
|
||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
info=Info.NORMAL_TX,
|
info=Info.NORMAL_TX,
|
||||||
mode=Modes.NORMAL,
|
mode=Modes.NORMAL,
|
||||||
submode=NormalSubmodes.TX_ON,
|
submode=(
|
||||||
|
1 << NormalSubmodesMask.DRO_ON
|
||||||
|
| (1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON)
|
||||||
|
| (1 << NormalSubmodesMask.X8_ON)
|
||||||
|
| (1 << NormalSubmodesMask.TX_ON)
|
||||||
|
),
|
||||||
)
|
)
|
||||||
if op_code in OpCodes.NORMAL_MPA:
|
if op_code in OpCodes.NORMAL_MPA:
|
||||||
pack_pl_pcdu_mode_cmd(
|
pack_pl_pcdu_mode_cmd(
|
||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
info=Info.NORMAL_MPA,
|
info=Info.NORMAL_MPA,
|
||||||
mode=Modes.NORMAL,
|
mode=Modes.NORMAL,
|
||||||
submode=NormalSubmodes.MPA_ON,
|
submode=(
|
||||||
|
1 << NormalSubmodesMask.DRO_ON
|
||||||
|
| (1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON)
|
||||||
|
| (1 << NormalSubmodesMask.X8_ON)
|
||||||
|
| (1 << NormalSubmodesMask.TX_ON)
|
||||||
|
| (1 << NormalSubmodesMask.MPA_ON)
|
||||||
|
),
|
||||||
)
|
)
|
||||||
if op_code in OpCodes.NORMAL_HPA:
|
if op_code in OpCodes.NORMAL_HPA:
|
||||||
pack_pl_pcdu_mode_cmd(
|
pack_pl_pcdu_mode_cmd(
|
||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
info=Info.NORMAL_HPA,
|
info=Info.NORMAL_HPA,
|
||||||
mode=Modes.NORMAL,
|
mode=Modes.NORMAL,
|
||||||
submode=NormalSubmodes.HPA_ON,
|
submode=(
|
||||||
|
1 << NormalSubmodesMask.DRO_ON
|
||||||
|
| (1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON)
|
||||||
|
| (1 << NormalSubmodesMask.X8_ON)
|
||||||
|
| (1 << NormalSubmodesMask.TX_ON)
|
||||||
|
| (1 << NormalSubmodesMask.MPA_ON)
|
||||||
|
| (1 << NormalSubmodesMask.MPA_ON)
|
||||||
|
),
|
||||||
)
|
)
|
||||||
if op_code in OpCodes.UPDATE_DRO_TO_X8_WAIT:
|
if op_code in OpCodes.UPDATE_DRO_TO_X8_WAIT:
|
||||||
pack_wait_time_cmd(
|
pack_wait_time_cmd(
|
||||||
|
@ -49,24 +49,24 @@ def pack_rad_sensor_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code:
|
|||||||
|
|
||||||
if op_code == "3":
|
if op_code == "3":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Start conversions"))
|
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Start conversions"))
|
||||||
command = object_id + struct.pack('!I', CommandIds.START_CONVERSIONS)
|
command = object_id + struct.pack("!I", CommandIds.START_CONVERSIONS)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=43, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=43, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
|
||||||
if op_code == "4":
|
if op_code == "4":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Read conversions"))
|
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Read conversions"))
|
||||||
command = object_id + struct.pack('!I', CommandIds.READ_CONVERSIONS)
|
command = object_id + struct.pack("!I", CommandIds.READ_CONVERSIONS)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=44, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=44, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
|
||||||
if op_code == "5":
|
if op_code == "5":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Enable debug output"))
|
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Enable debug output"))
|
||||||
command = object_id + struct.pack('!I', CommandIds.ENABLE_DEBUG_OUTPUT)
|
command = object_id + struct.pack("!I", CommandIds.ENABLE_DEBUG_OUTPUT)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=45, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=45, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
|
||||||
if op_code == "6":
|
if op_code == "6":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Disable debug output"))
|
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Disable debug output"))
|
||||||
command = object_id + struct.pack('!I', CommandIds.DISABLE_DEBUG_OUTPUT)
|
command = object_id + struct.pack("!I", CommandIds.DISABLE_DEBUG_OUTPUT)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=45, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=45, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
@ -43,16 +43,12 @@ def pack_syrlinks_command(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if op_code == "0":
|
if op_code == "0":
|
||||||
tc_queue.appendleft(
|
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Set mode off"))
|
||||||
(QueueCommands.PRINT, "Syrlinks: Set mode off")
|
|
||||||
)
|
|
||||||
command = pack_mode_data(object_id, Modes.OFF, 0)
|
command = pack_mode_data(object_id, Modes.OFF, 0)
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=9, app_data=command)
|
command = PusTelecommand(service=200, subservice=1, ssc=9, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "1":
|
if op_code == "1":
|
||||||
tc_queue.appendleft(
|
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Set mode on"))
|
||||||
(QueueCommands.PRINT, "Syrlinks: Set mode on")
|
|
||||||
)
|
|
||||||
command = pack_mode_data(object_id, Modes.ON, 0)
|
command = pack_mode_data(object_id, Modes.ON, 0)
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=10, app_data=command)
|
command = PusTelecommand(service=200, subservice=1, ssc=10, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
@ -111,23 +107,17 @@ def pack_syrlinks_command(
|
|||||||
command = PusTelecommand(service=8, subservice=128, ssc=16, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=16, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "12":
|
if op_code == "12":
|
||||||
tc_queue.appendleft(
|
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Write LCL config"))
|
||||||
(QueueCommands.PRINT, "Syrlinks: Write LCL config")
|
command = object_id + struct.pack("!I", CommandIds.WRITE_LCL_CONFIG)
|
||||||
)
|
|
||||||
command = object_id + struct.pack('!I', CommandIds.WRITE_LCL_CONFIG)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=17, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=17, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "13":
|
if op_code == "13":
|
||||||
tc_queue.appendleft(
|
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Read RX status registers"))
|
||||||
(QueueCommands.PRINT, "Syrlinks: Read RX status registers")
|
command = object_id + struct.pack("!I", CommandIds.READ_RX_STATUS_REGISTERS)
|
||||||
)
|
|
||||||
command = object_id + struct.pack('!I', CommandIds.READ_RX_STATUS_REGISTERS)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=18, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=18, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "14":
|
if op_code == "14":
|
||||||
tc_queue.appendleft(
|
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Read LCL config register"))
|
||||||
(QueueCommands.PRINT, "Syrlinks: Read LCL config register")
|
command = object_id + struct.pack("!I", CommandIds.READ_LCL_CONFIG_REGISTER)
|
||||||
)
|
|
||||||
command = object_id + struct.pack('!I', CommandIds.READ_LCL_CONFIG_REGISTER)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=19, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=19, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
Loading…
Reference in New Issue
Block a user