Update to v1.6.1 #5

Merged
muellerr merged 32 commits from develop into master 2021-06-21 17:41:58 +02:00
Showing only changes of commit 06750809cb - Show all commits

View File

@ -41,15 +41,15 @@ def pack_ploc_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
if PlocTestProcedure.all or PlocTestProcedure.test_tc_mem_write: if PlocTestProcedure.all or PlocTestProcedure.test_tc_mem_write:
tc_queue.appendleft((QueueCommands.PRINT, "PLOC: TC Mem Write Test")) tc_queue.appendleft((QueueCommands.PRINT, "PLOC: TC Mem Write Test"))
memory_address = int(input("Type memory address: 0x"), 16) memory_address = int(input("PLOC Tc Mem Write: Type memory address: 0x"), 16)
memory_data = int(input("Type memory data: 0x"), 16) memory_data = int(input("PLOC Tc Mem Write: Type memory data: 0x"), 16)
command = generateWriteMemCommand(object_id, struct.pack('!I', memory_address), memory_data) command = generate_write_mem_command(object_id, struct.pack('!I', memory_address), memory_data)
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command) command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if PlocTestProcedure.all or PlocTestProcedure.test_tc_mem_read: if PlocTestProcedure.all or PlocTestProcedure.test_tc_mem_read:
tc_queue.appendleft((QueueCommands.PRINT, "PLOC: TC Mem Read Test")) tc_queue.appendleft((QueueCommands.PRINT, "PLOC: TC Mem Read Test"))
memory_address = int(input("Type memory address: 0x"), 16) memory_address = int(input("PLOC Tc Mem Read: Type memory address: 0x"), 16)
command = object_id + PlocActionIds.tc_mem_read + struct.pack('!I', memory_address) command = object_id + PlocActionIds.tc_mem_read + struct.pack('!I', memory_address)
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())
@ -57,7 +57,7 @@ def pack_ploc_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
return tc_queue return tc_queue
def generateWriteMemCommand(object_id: bytearray, memory_address: bytearray, memory_data: int) -> bytearray: def generate_write_mem_command(object_id: bytearray, memory_address: bytearray, memory_data: int) -> bytearray:
""" This function generates the command to write to a memory address within the PLOC """ This function generates the command to write to a memory address within the PLOC
@param object_id The object id of the PlocHandler @param object_id The object id of the PlocHandler
@param memory_address The PLOC memory address where to write to. @param memory_address The PLOC memory address where to write to.