This commit is contained in:
2018-04-17 12:05:48 +02:00
parent 14edc0e745
commit 58a1260003
428 changed files with 41350 additions and 477 deletions
+39
View File
@@ -0,0 +1,39 @@
index = 0
class AnalogInput(ReadonlyRegisterBase):
def doRead(self):
global index
index = index+1
if index<5:
return None
return sin.read()
class Waveform(ReadonlyRegisterBase, ReadonlyRegisterArray):
def doRead(self):
global index
index = index+1
if index<5:
return None
return arr.read()
def getSize(self):
return arr.size
class Image(ReadonlyRegisterBase, ReadonlyRegisterMatrix):
def doRead(self):
global index
index = index+1
if index<5:
return None
return matrix.read()
def getWidth(self):
return matrix.width
def getHeight(self):
return matrix.height
add_device(AnalogInput("tst"), True)
add_device(Waveform("tst2"), True)
add_device(Image("tst3"), True)
tscan(tst3, 10, 0.1)