Add patch_put.py
Run CI Tests / test (push) Successful in 2m2s

This commit is contained in:
2025-08-08 20:18:30 +02:00
parent 107788de14
commit 27895484bf
+15
View File
@@ -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