Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
52396ed5
Commit
52396ed5
authored
Sep 11, 2016
by
Maxime Perrotin
Browse files
Ada backend fix related to continuous signals
parent
71cfe9b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
52396ed5
...
...
@@ -142,6 +142,10 @@ The background pattern was downloaded from www.subtlepatterns.com
Changelog
=========
1.
5.8 (09/2016)
-
Bugfix - Ada backend failed when there were continuous signals in
nested states but none at root level (missing end if)
-
Load fix when there is no dataview
1.
5.7 (09/2016)
-
Bugfix - Update completion list of process symbol
-
Sort ASN.1 types in data dictionary
...
...
opengeode/AdaGenerator.py
View file @
52396ed5
...
...
@@ -821,7 +821,6 @@ package {process_name} is'''.format(process_name=process_name,
# - Check current state(s)
# - For each continuous signal generate code (test+transition)
# XXX add to C backend
# Check Queue: TODO implement when simu=True
if
process
.
cs_mapping
and
not
simu
:
taste_template
.
append
(
'-- Process continuous signals'
)
taste_template
.
append
(
'if {}.initDone then'
.
format
(
LPREFIX
))
...
...
@@ -853,11 +852,14 @@ package {process_name} is'''.format(process_name=process_name,
done
=
[]
sep
=
'if '
last
=
''
# flag indicating there are CS in nested states but not at root
need_final_endif
=
False
for
cs
,
agg
in
product
(
process
.
cs_mapping
.
viewitems
(),
aggregates
.
viewitems
()):
(
statename
,
cs_item
),
(
agg_name
,
substates
)
=
cs
,
agg
for
each
in
substates
:
if
statename
in
each
.
mapping
.
viewkeys
():
need_final_endif
=
True
taste_template
.
append
(
u
'{first}if not msgPending and '
u
'trId = -1 and '
u
'{ctxt}.state = {s1} and '
...
...
@@ -882,10 +884,11 @@ package {process_name} is'''.format(process_name=process_name,
sep
=
'elsif '
taste_template
.
extend
(
code
)
done
.
append
(
statename
)
taste_template
.
append
(
u
'end if;
-- inner
'
)
# inner if
taste_template
.
append
(
u
'end if;'
)
# inner if
sep
=
'if '
break
for
statename
in
process
.
cs_mapping
.
viewkeys
()
-
done
:
need_final_endif
=
False
cs_item
=
process
.
cs_mapping
[
statename
]
taste_template
.
append
(
u
'{first}if not msgPending and '
u
'trId = -1 and {}.state = {} then'
...
...
@@ -908,6 +911,9 @@ package {process_name} is'''.format(process_name=process_name,
taste_template
.
append
(
u
'end if;'
)
# current state
sep
=
'if '
if
need_final_endif
:
taste_template
.
append
(
u
'end if;'
)
taste_template
.
append
(
'end loop;'
)
taste_template
.
append
(
'{ctxt}.initDone := True;'
.
format
(
ctxt
=
LPREFIX
))
taste_template
.
append
(
'end runTransition;'
)
...
...
opengeode/opengeode.py
View file @
52396ed5
...
...
@@ -138,7 +138,7 @@ except ImportError:
__all__
=
[
'opengeode'
,
'SDL_Scene'
,
'SDL_View'
,
'parse'
]
__version__
=
'1.5.
7
'
__version__
=
'1.5.
8
'
if
hasattr
(
sys
,
'frozen'
):
# Detect if we are running on Windows (py2exe-generated)
...
...
@@ -2321,7 +2321,11 @@ class OG_MainWindow(QtGui.QMainWindow, object):
def
set_asn1_view
(
self
,
ast
):
''' Display the ASN.1 types in the dedicated scene '''
# Update the dock widget with ASN.1 files content
html_file
=
open
(
ast
.
DV
.
html
,
'r'
)
try
:
html_file
=
open
(
ast
.
DV
.
html
,
'r'
)
except
AttributeError
:
LOG
.
debug
(
'set_asn1_view: No ASN.1 file specified'
)
return
html_content
=
html_file
.
read
()
self
.
asn1_browser
.
setHtml
(
html_content
)
...
...
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