Commit 249580ba authored by cermak's avatar cermak
Browse files

Fix again

Change-Id: I7f2052a19afa72e1df8e6bbe9305c752d69e21a9
parent 37ad398e
...@@ -200,6 +200,9 @@ class XRaySource(base.DiscreteOutput): ...@@ -200,6 +200,9 @@ class XRaySource(base.DiscreteOutput):
return self._state return self._state
def write_value(self, value): def write_value(self, value):
value = {1: 'ON', 0: 'OFF'}.value value = {1: 'ON', 0: 'OFF'}.get(value, None)
self._iodev.Communicate(f'XRAY {value}') if value:
self._iodev.Communicate(f'XRAY {value}')
else:
raise InvalidValue(f"Can't write {value} as target for this device.")
self.state() self.state()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment