fixed merge conflicts

This commit is contained in:
2021-04-26 15:01:22 +02:00
6 changed files with 87 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import struct
from typing import Tuple
from config.object_ids import ObjIdIds
from pus_tc.imtq import ImtqActionIds
from pus_tc.ploc import PlocReplyIds
def user_analyze_service_8_data(
@ -29,6 +30,8 @@ def user_analyze_service_8_data(
content_list = [data_string]
elif object_id == ObjIdIds.IMTQ_HANDLER_ID:
return handle_imtq_replies(action_id, custom_data)
elif object_id == ObjIdIds.PLOC_ID:
return handle_ploc_replies(action_id, custom_data)
else:
header_list = []
content_list = []
@ -44,4 +47,12 @@ def handle_imtq_replies(action_id: int, custom_data: bytearray) -> Tuple[list, l
y_dipole = struct.unpack('!H', custom_data[2:4])
z_dipole = struct.unpack('!H', custom_data[4:6])
content_list = [x_dipole[0], y_dipole[0], z_dipole[0]]
def handle_ploc_replies(action_id: int, custom_data: bytearray) -> Tuple[list, list]:
header_list = []
content_list = []
if action_id == PlocReplyIds.tm_mem_read_report:
header_list = ['PLOC Memory Address', 'PLOC Mem Len', 'PLOC Read Memory Data']
content_list = [custom_data[:4], custom_data[4:6], custom_data[6:10]]
return header_list, content_list