Skip to content
Snippets Groups Projects

Fix bug in reftek not plot channel with question mark '?' if use preference list

Merged Lan Dam requested to merge i128_plot_question_chan_when_use_preflist into master
2 files
+ 22
5
Compare changes
  • Side-by-side
  • Inline
Files
2
from __future__ import annotations
from typing import Callable, Tuple, List, Union, Set, TYPE_CHECKING
from typing import Callable, Tuple, List, Union, Set, Dict, TYPE_CHECKING
from sohstationviewer.conf import constants
from sohstationviewer.controller.util import (
get_time_6, get_time_4, get_val, rtn_pattern)
from sohstationviewer.view.util.enums import LogType
from sohstationviewer.model.reftek_data.log_info_helper import (
remove_question_marks)
if TYPE_CHECKING:
from sohstationviewer.model.reftek_data.reftek import RT130
@@ -33,7 +35,7 @@ class LogInfo():
self.key = key
self.unit_id, self.exp_no = key
self.req_data_streams = req_data_streams
self.req_soh_chans = req_soh_chans
self.no_question_req_soh_chans = remove_question_marks(req_soh_chans)
self.is_log_file = is_log_file
"""
track_year to add year to time since year time not include year after
@@ -49,7 +51,7 @@ class LogInfo():
self.model = "72A"
self.max_epoch = 0
self.min_epoch = constants.HIGHEST_INT
self.chans: dict = self.parent.soh_data[self.key]
self.chans: Dict = self.parent.soh_data[self.key]
self.cpu_vers: Set[str] = set()
self.gps_vers: Set[str] = set()
self.extract_info()
@@ -314,9 +316,10 @@ class LogInfo():
:param d: float - value of data
:param idx: int - index of SOH message line
"""
if self.req_soh_chans and chan_id not in self.req_soh_chans:
if self.no_question_req_soh_chans and not chan_id.startswith(
tuple(self.no_question_req_soh_chans)):
return
if chan_id not in self.chans:
self.chans[chan_id] = {
'reftek': True,
Loading