Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
asn1-value-editor
Commits
83f44008
Commit
83f44008
authored
Sep 03, 2016
by
Maxime Perrotin
Browse files
Fix minor issues
parent
6576108e
Changes
3
Hide whitespace changes
Inline
Side-by-side
asn1_value_editor/errCode.py
View file @
83f44008
...
...
@@ -29,11 +29,16 @@ def errCode():
errCodes
=
{}
# Lines: #define ERR_FCE_SIT_4_rc 1015 /*(1 .. 5)*/
for
line
in
f
.
readlines
():
if
line
.
startswith
(
'#define ERR'
):
errName
=
re
.
search
(
'(ERR_)(?P<A>\w*)'
,
line
).
group
(
'A'
)
errValue
=
int
(
re
.
search
(
'[0-9]+'
,
line
).
group
(
0
))
const
=
re
.
search
(
'(/\*\s*)(?P<A>[\S\s]*)(\*/)'
,
line
).
group
(
'A'
).
strip
()
content
=
line
.
split
()[
1
:]
errName
=
content
[
0
][
4
:]
errValue
=
int
(
content
[
1
])
const
=
''
.
join
(
content
[
2
:])[
slice
(
2
,
-
2
)]
# errName=re.search('(ERR_)(?P<A>\w*)',line).group('A')
# errValue=int(re.search('[0-9]+',line).group(0))
# const=re.search('(/\*\s*)(?P<A>[\S\s]*)(\*/)',line).group('A').strip()
errCodes
[
errValue
]
=
{
'name'
:
errName
,
'constraint'
:
const
}
print
errCodes
...
...
asn1_value_editor/mscHandler.py
View file @
83f44008
...
...
@@ -251,7 +251,7 @@ endmscdocument;
'''
)
msc_name
=
self
.
fv_name
+
'_trace_'
+
strftime
(
"%Y%m%d%H%S"
)
+
'.msc'
msc_file
=
open
(
msc_name
,
'w'
)
msc_file
.
write
(
'
\n
'
.
join
(
self
.
msc
))
msc_file
.
write
(
'
\n
'
.
join
(
self
.
msc
)
.
encode
(
'latin1'
)
)
msc_file
.
close
()
def
run
(
self
,
script
=
None
):
...
...
asn1_value_editor/sdlHandler.py
View file @
83f44008
...
...
@@ -830,7 +830,7 @@ class sdlHandler(QObject):
question
=
QMessageBox
(
self
.
parent
,
'Evaluate Continuous States'
,
''
)
question
.
setText
(
'Do you want to send a new message or evaluate '
'
evaluate
continuous signals (default in 3 sec)?'
)
'continuous signals (default in 3 sec
onds!
)?'
)
question
.
addButton
(
'Send message'
,
QMessageBox
.
AcceptRole
)
question
.
addButton
(
'Evaluate continuous signals'
,
QMessageBox
.
RejectRole
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment