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):
return self._state
def write_value(self, value):
value = {1: 'ON', 0: 'OFF'}.value
self._iodev.Communicate(f'XRAY {value}')
value = {1: 'ON', 0: 'OFF'}.get(value, None)
if value:
self._iodev.Communicate(f'XRAY {value}')
raise InvalidValue(f"Can't write {value} as target for this device.")
\ No newline at end of file
Supports Markdown
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