This commit is contained in:
@@ -10,6 +10,21 @@ def get_pv(*args, connect=False, timeout=0, **kwargs):
|
||||
return _get_pv(*args, connect=connect, timeout=timeout, **kwargs)
|
||||
|
||||
|
||||
################################################################ en +++++++++++
|
||||
_ORIG_PUT = epics.PV.put
|
||||
|
||||
# put with a sleep : needed for platforms like IOC
|
||||
def put(self, value, *args, **kwargs):
|
||||
kwargs.setdefault("wait", True)
|
||||
kwargs.setdefault("timeout", 0.1)
|
||||
|
||||
res = _ORIG_PUT(self, value, *args, **kwargs)
|
||||
time.sleep(0.2)
|
||||
return res
|
||||
|
||||
# Monkey patch global
|
||||
epics.PV.put = put
|
||||
###################################################################
|
||||
|
||||
# this is a copy of the epics.Motor constructor with some modifications
|
||||
class Motor(epics.Motor):
|
||||
|
||||
Reference in New Issue
Block a user