From 402f679bf4bcb06b72db4da162e7f7de5b8a4ae6 Mon Sep 17 00:00:00 2001 From: tligui_y Date: Fri, 8 Aug 2025 17:07:43 +0200 Subject: [PATCH] Update slic/utils/hastyepics.py --- slic/utils/hastyepics.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/slic/utils/hastyepics.py b/slic/utils/hastyepics.py index 1945bc81a..bdc8e3974 100644 --- a/slic/utils/hastyepics.py +++ b/slic/utils/hastyepics.py @@ -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):