Commit 29742eea authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Fix setting of initDone

must be set to true only after elaboration (complete execution of the
first transition).
parent fe745980
......@@ -142,6 +142,9 @@ The background pattern was downloaded from
1.5.16 (11/2016)
- Fixed issue with initialization of generated code in state aggregations
1.5.16 (11/2016)
- Fix minor indentation issue when saving
......@@ -307,18 +307,22 @@ LD_LIBRARY_PATH=. opengeode-simulator
process_level_decl.append('procedure runTransition(Id: Integer);')
# Generate the code of the start transition (if process not empty)
initDone = u'{ctxt}.initDone := True;'.format(ctxt=LPREFIX)
if not simu:
start_transition = ['begin',
'runTransition(0);'] if process.transitions else []
start_transition = [u'begin']
if process.transitions:
start_transition = ['procedure Startup;',
'pragma Export(C, Startup, "{}_startup");'
start_transition = [u'procedure Startup;',
u'pragma Export(C, Startup, "{}_startup");'
'procedure Startup is',
' runTransition(0);' if process.transitions
u'procedure Startup is',
u' runTransition(0);' if process.transitions
else 'null;',
'end Startup;']
u'end Startup;']
# Generate the TASTE template
......@@ -915,7 +919,6 @@ package {process_name} is'''.format(process_name=process_name,
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;')
......@@ -138,7 +138,7 @@ except ImportError:
__all__ = ['opengeode', 'SDL_Scene', 'SDL_View', 'parse']
__version__ = '1.5.16'
__version__ = '1.5.17'
if hasattr(sys, 'frozen'):
# Detect if we are running on Windows (py2exe-generated)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment