Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SOHViewer
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Public
PASSOFT
SOHViewer
Commits
5fb4005f
Commit
5fb4005f
authored
1 year ago
by
Lan Dam
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug in reftek not plot channel with question mark '?' if use preference list
parent
51a64c4d
No related branches found
Branches containing commit
No related tags found
1 merge request
!154
Fix bug in reftek not plot channel with question mark '?' if use preference list
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sohstationviewer/model/reftek_data/log_info.py
+8
-5
8 additions, 5 deletions
sohstationviewer/model/reftek_data/log_info.py
sohstationviewer/model/reftek_data/log_info_helper.py
+14
-0
14 additions, 0 deletions
sohstationviewer/model/reftek_data/log_info_helper.py
with
22 additions
and
5 deletions
sohstationviewer/model/reftek_data/log_info.py
+
8
−
5
View file @
5fb4005f
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
:
d
ict
=
self
.
parent
.
soh_data
[
self
.
key
]
self
.
chans
:
D
ict
=
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
,
...
...
This diff is collapsed.
Click to expand it.
sohstationviewer/model/reftek_data/log_info_helper.py
0 → 100644
+
14
−
0
View file @
5fb4005f
def
remove_question_marks
(
req_soh_chan
):
"""
Remove the question marks in the channel request list, req_soh_chan
:param req_soh_chan: soh channel request list
:return no_question_req_soh_chan: the channel request list with the
question marks removed
"""
no_question_req_soh_chan
=
[]
for
idx
,
req
in
enumerate
(
req_soh_chan
):
if
req
.
endswith
(
'
?
'
):
no_question_req_soh_chan
.
append
(
req_soh_chan
[
idx
][:
-
1
])
else
:
no_question_req_soh_chan
.
append
(
req_soh_chan
[
idx
])
return
no_question_req_soh_chan
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment