fix code for current framwork version

- remove _iodev, use HasIo instead of HasIodev
- add earlyInit super call
This commit is contained in:
2022-09-08 14:57:06 +02:00
parent 8bfe969a95
commit 3597adf869
3 changed files with 9 additions and 8 deletions

View File

@ -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))