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

Read mass-position lines in SOHStationViewer log

parent fa7dcc29
No related branches found
No related tags found
1 merge request!199Write log file
This commit is part of merge request !199. Comments created here will be created in the context of that merge request.
...@@ -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