Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
asn1-value-editor
Commits
a1abb80e
Commit
a1abb80e
authored
Jul 17, 2016
by
Maxime Perrotin
Browse files
Fix plotters
parent
ac79c3b2
Changes
1
Show whitespace changes
Inline
Side-by-side
asn1_value_editor/asn1_value_editor.py
View file @
a1abb80e
...
...
@@ -463,14 +463,6 @@ class asn1Editor(QTreeView):
ptr
=
getattr
(
dest
,
name
)
if
not
seqOf
else
dest
if
seqOf
:
ptr
=
ptr
[
i
]
if
asnType
in
(
'INTEGER'
,
'REAL'
,
'SEQOF'
):
# XXX plotter: TODO
plotters
=
child
.
data
(
PLOTTERS
)
if
plotters
is
not
None
:
self
.
log
.
debug
(
"updateModel - updatePlot call"
)
for
plotter
in
plotters
:
self
.
plotterBackend
.
updatePlot
(
plotter
,
value
)
self
.
log
.
debug
(
"updateModel - updatePlot end"
)
if
asnType
in
(
'INTEGER'
,
'REAL'
):
child
.
setText
(
str
(
ptr
.
Get
()))
elif
asnType
==
'BOOLEAN'
:
...
...
@@ -514,6 +506,14 @@ class asn1Editor(QTreeView):
ptr
.
Reset
(
state
)
child
.
setText
(
str
(
size
))
self
.
updateModel
(
root
.
child
(
i
),
ptr
,
nbRows
=
size
)
if
asnType
in
(
'INTEGER'
,
'REAL'
,
'SEQOF'
):
plotters
=
child
.
data
(
PLOTTERS
)
if
plotters
is
not
None
:
self
.
log
.
debug
(
"updateModel - updatePlot call"
)
value
=
float
(
child
.
text
())
for
plotter
in
plotters
:
self
.
plotterBackend
.
updatePlot
(
plotter
,
value
)
self
.
log
.
debug
(
"updateModel - updatePlot end"
)
if
choice
!=
-
1
:
stateBefore
=
ptr
.
GetState
()
...
...
@@ -583,11 +583,10 @@ class asn1Editor(QTreeView):
else
:
# SEQUENCE or SET
self
.
updateModel
(
root
,
asn1Instance
)
if
asnType
in
(
'INTEGER'
,
'REAL'
,
'SEQOF'
):
plotters
=
self
.
model
.
item
(
row
,
3
).
data
(
PLOTTERS
)
if
plotters
!=
None
:
plotters
=
self
.
model
.
item
(
row
,
3
).
data
(
PLOTTERS
)
or
[]
value
=
self
.
model
.
item
(
row
,
3
).
text
()
for
plotter
in
plotters
:
# XXX this won't work, value is not in the right format
self
.
plotterBackend
.
updatePlot
(
plotter
,
value
)
self
.
plotterBackend
.
updatePlot
(
plotter
,
float
(
value
))
self
.
hideUnusedFields
(
root
,
True
,
row
=
row
)
if
self
.
plotterBackend
is
not
None
:
self
.
plotterBackend
.
refresh
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment