Commit a9e05a61 authored by bliss administrator's avatar bliss administrator Committed by Sebastien Petitdemange
Browse files

replaced fshutter controller (for MX beamlines) by icepap shutter with

external switch for MD2
TODO: remove old controller
parent 78f35f52
......@@ -5,10 +5,28 @@ protocol for communication.
from bliss.controllers.motor import Controller
from bliss.common import log as elog
from bliss.common.axis import AxisState
from bliss.common.switch import Switch as BaseSwitch
from bliss.comm.Exporter import *
import time
import gevent
class Switch(BaseSwitch):
def __init__(self, name, controller, config):
BaseSwitch.__init__(self, name, config)
self.md2 = controller
def _states_list(self):
return ["OPEN", "CLOSED"]
def _set(self, state):
self.md2._exporter.writeProperty("FastShutterIsOpen", "true" if state == "OPEN" else "false")
def _get(self):
return "OPEN" if self.md2._exporter.readProperty("FastShutterIsOpen") == "true" else "CLOSED"
class MD2(Controller):
def __init__(self, *args, **kwargs):
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