- add synced support for heater range
This commit is contained in:
@ -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__;
|
||||||
|
Reference in New Issue
Block a user