rework it
This commit is contained in:
@ -524,8 +524,7 @@ def get_sequence_file() -> str:
|
||||
return file
|
||||
|
||||
|
||||
def handle_ploc_mpsoc_hk_data(printer: FsfwTmTcPrinter, hk_data: bytes, set_id: int):
|
||||
pw = PrintWrapper(printer)
|
||||
def handle_ploc_mpsoc_hk_data(pw: PrintWrapper, hk_data: bytes, set_id: int):
|
||||
if set_id == SetId.HK_ID:
|
||||
fmt_str = "!IBBBBBBB"
|
||||
current_idx = 0
|
||||
@ -640,10 +639,7 @@ class DirElement:
|
||||
size: int
|
||||
|
||||
|
||||
def handle_mpsoc_data_reply(
|
||||
action_id: int, printer: FsfwTmTcPrinter, custom_data: bytearray
|
||||
):
|
||||
pw = PrintWrapper(printer)
|
||||
def handle_mpsoc_data_reply(action_id: int, pw: PrintWrapper, custom_data: bytearray):
|
||||
if action_id == ActionId.TM_MEM_READ_RPT:
|
||||
header_list = [
|
||||
"PLOC Memory Address",
|
||||
@ -655,20 +651,16 @@ def handle_mpsoc_data_reply(
|
||||
struct.unpack("!H", custom_data[4:6])[0],
|
||||
"0x" + custom_data[6:10].hex(),
|
||||
]
|
||||
print(header_list)
|
||||
print(content_list)
|
||||
printer.file_logger.info(header_list)
|
||||
printer.file_logger.info(content_list)
|
||||
pw.dlog(f"{header_list}")
|
||||
pw.dlog(f"{content_list}")
|
||||
elif action_id == ActionId.TM_CAM_CMD_RPT:
|
||||
header_list = ["Camera reply string", "ACK"]
|
||||
content_list = [
|
||||
custom_data[: len(custom_data) - 1].decode("utf-8"),
|
||||
hex(custom_data[-1]),
|
||||
]
|
||||
print(header_list)
|
||||
print(content_list)
|
||||
printer.file_logger.info(header_list)
|
||||
printer.file_logger.info(content_list)
|
||||
pw.dlog(f"{header_list}")
|
||||
pw.dlog(f"{content_list}")
|
||||
elif action_id == ActionId.TM_FLASH_DIRECTORY_CONTENT:
|
||||
if len(custom_data) < 16:
|
||||
_LOGGER.warning(
|
||||
|
Reference in New Issue
Block a user