fix code for current framwork version
- remove _iodev, use HasIo instead of HasIodev - add earlyInit super call
This commit is contained in:
@ -24,7 +24,7 @@ import time
|
||||
|
||||
from secop.datatypes import StringType, FloatRange
|
||||
from secop.modules import Parameter, Property, Readable
|
||||
from secop.io import HasIodev, StringIO
|
||||
from secop.io import HasIO, StringIO
|
||||
|
||||
|
||||
class LscIO(StringIO):
|
||||
@ -33,13 +33,13 @@ class LscIO(StringIO):
|
||||
wait_before = 0.05
|
||||
|
||||
|
||||
class ResChannel(HasIodev, Readable):
|
||||
class ResChannel(HasIO, Readable):
|
||||
"""temperature channel on Lakeshore 340"""
|
||||
|
||||
iodevClass = LscIO
|
||||
ioClass = LscIO
|
||||
|
||||
value = Parameter(datatype=FloatRange(unit='Ohm'))
|
||||
channel = Property('the channel A,B,C or D', StringType())
|
||||
|
||||
def read_value(self):
|
||||
return float(self._iodev.communicate('SRDG?%s' % self.channel))
|
||||
return float(self.communicate('SRDG?%s' % self.channel))
|
||||
|
Reference in New Issue
Block a user