frapp_psi.iomopinmax: digital output and SimpleVoltageInput
- read back value in DigitalOutput.write_target - correct scale factor in SimpleVoltageInput
This commit is contained in:
@@ -100,6 +100,7 @@ class DigitalOutput(DigitalInput, Writable):
|
|||||||
|
|
||||||
def write_target(self, value):
|
def write_target(self, value):
|
||||||
self.write(self.addr, value == self.true_level, 1)
|
self.write(self.addr, value == self.true_level, 1)
|
||||||
|
self.read_value()
|
||||||
|
|
||||||
|
|
||||||
class AnalogInput(Base, Readable):
|
class AnalogInput(Base, Readable):
|
||||||
@@ -142,8 +143,7 @@ class VoltageInput(AnalogInput):
|
|||||||
|
|
||||||
class SimpleVoltageInput(AnalogInput):
|
class SimpleVoltageInput(AnalogInput):
|
||||||
"""version for iono pi"""
|
"""version for iono pi"""
|
||||||
scale = 1e-3
|
scale = 1e6 / 1024 # probably a firmware or documentation error
|
||||||
|
|
||||||
|
|
||||||
class LogVoltageInput(VoltageInput):
|
class LogVoltageInput(VoltageInput):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user