Skip to content

Commit d7d54c0

Browse files
committed
Fix sample script to use correct concore function names
1 parent 3e06d5b commit d7d54c0

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

concore_cli/commands/init.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,17 @@
2525

2626
SAMPLE_PYTHON = '''import concore
2727
28-
while not concore.concore_unchanged():
29-
data = concore.concore_read()
30-
result = data * 2
31-
concore.concore_write(result)
28+
concore.default_maxtime(100)
29+
concore.delay = 0.02
30+
31+
init_simtime_val = "[0.0, 0.0]"
32+
val = concore.initval(init_simtime_val)
33+
34+
while(concore.simtime<concore.maxtime):
35+
while concore.unchanged():
36+
val = concore.read(1,"data",init_simtime_val)
37+
result = [v * 2 for v in val]
38+
concore.write(1,"result",result,delta=0)
3239
'''
3340

3441
README_TEMPLATE = '''# {project_name}

0 commit comments

Comments
 (0)