From 27895484bfdcdbb82aa14695a873b74565779d91 Mon Sep 17 00:00:00 2001 From: tligui_y Date: Fri, 8 Aug 2025 20:18:30 +0200 Subject: [PATCH] Add patch_put.py --- patch_put.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 patch_put.py diff --git a/patch_put.py b/patch_put.py new file mode 100644 index 00000000..c59f5013 --- /dev/null +++ b/patch_put.py @@ -0,0 +1,15 @@ +# ioc_put_patch.py +import time +import epics + +_orig_put = epics.PV.put + +def _patched_put(self, value, *args, **kwargs): + kwargs.setdefault("wait", True) # force mode bloquant + kwargs.setdefault("timeout", 0.1) # petit timeout rapide + res = _orig_put(self, value, *args, **kwargs) + time.sleep(0.2) # petit délai pour laisser le IOC mettre à jour + return res + +# Patch global de epics.PV.put +epics.PV.put = _patched_put