fixed merge conflict

This commit is contained in:
Jakob Meier
2022-03-25 09:13:47 +01:00
2 changed files with 25 additions and 1 deletions

View File

@ -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