Skip to content
Snippets Groups Projects
Commit 990e5347 authored by Kien Le's avatar Kien Le
Browse files

Read mass-position lines in SOHStationViewer log

parent 9d83fcd7
No related branches found
No related tags found
No related merge requests found
...@@ -125,7 +125,7 @@ def parse_log_packet_sohstationviewer(packet: List[str] ...@@ -125,7 +125,7 @@ def parse_log_packet_sohstationviewer(packet: List[str]
""" """
Parse a log packet assuming that the log file comes from sohstationviewer. Parse a log packet assuming that the log file comes from sohstationviewer.
In this case, the file is composed mainly of SOH packets, with the event In this case, the file is composed mainly of SOH packets, with the event
info lines being written at the end of the file. info and mass-position lines being written at the end of the file.
:param packet: list of lines in the packet :param packet: list of lines in the packet
:return: the lists of event lines, SOH lines, and mass-position lines in :return: the lists of event lines, SOH lines, and mass-position lines in
packet packet
...@@ -135,6 +135,8 @@ def parse_log_packet_sohstationviewer(packet: List[str] ...@@ -135,6 +135,8 @@ def parse_log_packet_sohstationviewer(packet: List[str]
masspos_lines = [] masspos_lines = []
if packet[0].startswith('Events:'): if packet[0].startswith('Events:'):
eh_et_lines = packet[1:] eh_et_lines = packet[1:]
elif packet[0].startswith('Mass-positions:'):
masspos_lines = packet[1:]
else: else:
soh_lines = packet soh_lines = packet
return eh_et_lines, soh_lines, masspos_lines return eh_et_lines, soh_lines, masspos_lines
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment