diff --git a/ighdriv.c b/ighdriv.c index 4e9bc9b..c6277d8 100644 --- a/ighdriv.c +++ b/ighdriv.c @@ -30,6 +30,7 @@ Markus Zolliker, May 2005 #include "oxinst.h" #include "fsm.h" #include "initializer.h" +#include "syncedprot.h" #define OLDIGH -8 #define SORBS_FLAG 1 @@ -80,6 +81,7 @@ typedef struct { int o; /* actual still/sorb mode */ int s; /* moving valve state */ int remote; + long hrSync; } Igh; static ParClass ighClass = { "IGH", sizeof(Igh) }; @@ -183,6 +185,9 @@ static void IghParDef(void *object) ParInt(&drv->e, PAR_NAN); if (ParActionIs(PAR_SET) > 0) { drv->mixP = 0; + if (drv->hrSync == 0) { + drv->hrSync=SyncedIncr(0); + } } ParName("Pstill"); @@ -743,6 +748,10 @@ static long IghSet(long pc, void *object) EaseWrite(eab, buf); return __LINE__; case __LINE__: /**********************************/ + if (drv->hrSync > 0) { + SyncedDecr(drv->hrSync); + drv->hrSync = 0; + } if (drv->a == 2) goto loop; EaseWrite(eab, "A1"); return __LINE__;