This commit is contained in:
2018-01-24 12:03:38 +01:00
parent 2438c5ead0
commit 3f5df06b7d
3 changed files with 24 additions and 3 deletions

21
script/test/TestNested.py Normal file
View File

@@ -0,0 +1,21 @@
index=0
def calc():
global index
index += 1
ret= tscan(sin, 10, 0.1, tag="scan " + str(index))
#ret= tscan(sin, 10, 0.1)
v = max(ret.getReadable(0))
return float(v)
class PseudoDev(Readable):
def read(self):
return calc()
d= PseudoDev()
ret= lscan(inp, (d), 0, 40, 5, 0.2, tag="output")
#ret= lscan(inp, (d), 0, 40, 5, 0.2)