Changes to Scaler, add build for version 7 in Makefile
This commit is contained in:
@ -4,7 +4,7 @@ include /ioc/tools/driver.makefile
|
|||||||
MODULE=sinq
|
MODULE=sinq
|
||||||
LIBVERSION=koennecke
|
LIBVERSION=koennecke
|
||||||
BUILDCLASSES=Linux
|
BUILDCLASSES=Linux
|
||||||
EPICS_VERSIONS=3.14.12
|
EPICS_VERSIONS=3.14.12 7.0.4.1
|
||||||
|
|
||||||
# additional module dependencies
|
# additional module dependencies
|
||||||
REQUIRED+=SynApps
|
REQUIRED+=SynApps
|
||||||
|
@ -163,7 +163,7 @@ static void connectSlaveRecords(EL737priv *priv)
|
|||||||
errlogPrintf("dbNameToAddr failed for %s with %s\n", slaveName, errName);
|
errlogPrintf("dbNameToAddr failed for %s with %s\n", slaveName, errName);
|
||||||
priv->dbInit = 0;
|
priv->dbInit = 0;
|
||||||
} else {
|
} else {
|
||||||
errlogPrintf("dbNameToAddr succeded for %s, record access %s\n",slaveName, priv->status.precord->name);
|
errlogPrintf("dbNameToAddr succeded for %s, record access %s\n",slaveName, priv->threshCounter.precord->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(slaveName,sizeof(slaveName),"%s:Threshold", priv->psr->name);
|
snprintf(slaveName,sizeof(slaveName),"%s:Threshold", priv->psr->name);
|
||||||
@ -174,9 +174,9 @@ static void connectSlaveRecords(EL737priv *priv)
|
|||||||
errlogPrintf("dbNameToAddr failed for %s with %s\n", slaveName, errName);
|
errlogPrintf("dbNameToAddr failed for %s with %s\n", slaveName, errName);
|
||||||
priv->dbInit = 0;
|
priv->dbInit = 0;
|
||||||
} else {
|
} else {
|
||||||
errlogPrintf("dbNameToAddr succeded for %s, record access %s\n",slaveName, priv->status.precord->name);
|
errlogPrintf("dbNameToAddr succeded for %s, record access %s\n",slaveName, priv->threshold.precord->name);
|
||||||
}
|
}
|
||||||
|
priv->thresholdValue = -999;
|
||||||
}
|
}
|
||||||
|
|
||||||
static long el737_init_record(scalerRecord *psr, CALLBACK *pcallback)
|
static long el737_init_record(scalerRecord *psr, CALLBACK *pcallback)
|
||||||
@ -429,8 +429,9 @@ static void runEvents(EL737priv *priv)
|
|||||||
errSymLookup(dbStatus,errName,sizeof(errName));
|
errSymLookup(dbStatus,errName,sizeof(errName));
|
||||||
errlogPrintf("Reading thresholdCounter failed with %s\n", errName);
|
errlogPrintf("Reading thresholdCounter failed with %s\n", errName);
|
||||||
} else {
|
} else {
|
||||||
if(threshCounter > 0) {
|
if(threshCounter == 0){
|
||||||
/* The threshCounter is valid */
|
threshCounter = 1;
|
||||||
|
}
|
||||||
sprintf(command,"DL %d %d", (int)threshCounter,
|
sprintf(command,"DL %d %d", (int)threshCounter,
|
||||||
(int)myThreshold);
|
(int)myThreshold);
|
||||||
errlogPrintf("Sending threshold command %s\n", command);
|
errlogPrintf("Sending threshold command %s\n", command);
|
||||||
@ -441,9 +442,6 @@ static void runEvents(EL737priv *priv)
|
|||||||
priv->sendThreshold = 0;
|
priv->sendThreshold = 0;
|
||||||
priv->thresholdValue = myThreshold;
|
priv->thresholdValue = myThreshold;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
errlogPrintf("Invalid threshold monitor %ld, no threshold sent", threshCounter);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -452,7 +450,7 @@ static void runEvents(EL737priv *priv)
|
|||||||
if(priv->sendThreshold == 1) {
|
if(priv->sendThreshold == 1) {
|
||||||
// fallback when we do not have the DB fields or threshCounter is invalid
|
// fallback when we do not have the DB fields or threshCounter is invalid
|
||||||
if(priv->presets[THRESHMON] <= 0) {
|
if(priv->presets[THRESHMON] <= 0) {
|
||||||
errlogPrintf("Invalid threshold monitor %ld, no threshold sent", priv->presets[THRESHMON]);
|
errlogPrintf("Invalid threshold preset monitor %ld, no threshold sent", priv->presets[THRESHMON]);
|
||||||
} else {
|
} else {
|
||||||
sprintf(command,"DL %d %d", (int)priv->presets[THRESHMON],
|
sprintf(command,"DL %d %d", (int)priv->presets[THRESHMON],
|
||||||
(int)priv->presets[THRESHVAL]);
|
(int)priv->presets[THRESHVAL]);
|
||||||
|
Reference in New Issue
Block a user