diff --git a/pus_tc/devs/ploc_mpsoc.py b/pus_tc/devs/ploc_mpsoc.py index 9a39acb..bec0ac7 100644 --- a/pus_tc/devs/ploc_mpsoc.py +++ b/pus_tc/devs/ploc_mpsoc.py @@ -59,8 +59,10 @@ class MemAddresses(enum.IntEnum): DEADBEEF = 0x40000004 -class PlocReplyIds: - tm_mem_read_report = 6 +class PlocReplyIds(enum.IntEnum): + TM_MEM_READ_RPT = 6 + TM_CAM_CMD_RPT = 19 + def pack_ploc_mpsoc_commands( diff --git a/pus_tm/action_reply_handler.py b/pus_tm/action_reply_handler.py index 0a8e537..17085de 100644 --- a/pus_tm/action_reply_handler.py +++ b/pus_tm/action_reply_handler.py @@ -58,7 +58,7 @@ def handle_imtq_replies( def handle_ploc_replies( action_id: int, printer: FsfwTmTcPrinter, custom_data: bytearray ): - if action_id == PlocReplyIds.tm_mem_read_report: + if action_id == PlocReplyIds.TM_MEM_READ_RPT: header_list = [ "PLOC Memory Address", "PLOC Mem Len", @@ -73,6 +73,13 @@ def handle_ploc_replies( print(content_list) printer.file_logger.info(header_list) printer.file_logger.info(content_list) + elif action_id == PlocReplyIds.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) def handle_supervisor_replies(