fixed merge conflict
This commit is contained in:
commit
63b35da15c
@ -468,6 +468,8 @@ def add_ploc_mpsoc_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
"7": ("Ploc MPSoC: Downlink pwr off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"8": ("Ploc MPSoC: Replay write sequence", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"9": ("Ploc MPSoC: OBSW reset sequence count", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"10": ("Ploc MPSoC: Read DEADBEEF address", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"11": ("Ploc MPSoC: Mode replay", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_ploc_mpsoc_tuple = ("Ploc MPSoC", op_code_dict_srv_ploc_mpsoc)
|
||||
cmd_dict[CustomServiceList.PLOC_MPSOC.value] = service_ploc_mpsoc_tuple
|
||||
|
@ -25,6 +25,7 @@ flash_write_file_dict = {
|
||||
}
|
||||
|
||||
mpsoc_file_dict = {
|
||||
"1": ["0:/EM16/231", "0:/EM16/231"],
|
||||
MANUAL_INPUT: ["manual input", ""],
|
||||
"2": ["/tmp/flash_write", "/tmp/flash_write.bin"],
|
||||
}
|
||||
@ -40,7 +41,15 @@ class CommandIds(enum.IntEnum):
|
||||
TC_REPLAY_WRITE_SEQUENCE = 13
|
||||
TC_DOWNLINK_PWR_ON = 14
|
||||
TC_DOWNLINK_PWR_OFF = 15
|
||||
<<<<<<< HEAD
|
||||
OBSW_RESET_SEQ_COUNT = 50
|
||||
=======
|
||||
TC_MODE_REPLAY = 16
|
||||
|
||||
|
||||
class MemAddresses(enum.IntEnum):
|
||||
DEADBEEF = 0x40000000
|
||||
>>>>>>> 6572a5df6169772b517f2de2f3e4a1ba8f6471f4
|
||||
|
||||
|
||||
class PlocReplyIds:
|
||||
@ -113,6 +122,18 @@ def pack_ploc_mpsoc_commands(
|
||||
command = object_id + struct.pack('!I', CommandIds.OBSW_RESET_SEQ_COUNT)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "10":
|
||||
num_words = 1
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Read DEADBEEF address"))
|
||||
command = object_id + struct.pack('!I', CommandIds.TC_MEM_READ) + struct.pack("!I", MemAddresses.DEADBEEF) + \
|
||||
struct.pack('!H', num_words)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "11":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Tc mode replay"))
|
||||
command = object_id + struct.pack('!I', CommandIds.TC_MODE_REPLAY)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=29, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
||||
|
||||
@ -174,10 +195,11 @@ def prepare_downlink_pwr_on_cmd(object_id: bytearray) -> bytearray:
|
||||
|
||||
|
||||
def prepare_replay_write_sequence_cmd(object_id: bytearray) -> bytearray:
|
||||
null_terminator = 0
|
||||
use_decoding = int(input("Use decoding (set to 1): "))
|
||||
file = get_mpsoc_file()
|
||||
command = object_id + struct.pack('!I', CommandIds.TC_REPLAY_WRITE_SEQUENCE) + struct.pack('!B', use_decoding) + \
|
||||
bytearray(file, 'utf-8')
|
||||
bytearray(file, 'utf-8') + struct.pack('!B', null_terminator)
|
||||
return command
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user