- add synced support for heater range

This commit is contained in:
zolliker
2013-06-07 06:42:36 +00:00
parent 32baca27f3
commit d2fdcd8819

View File

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