- various improvements in SE drivers

This commit is contained in:
zolliker
2006-08-17 15:39:37 +00:00
parent 928738dbd8
commit ce25823567
19 changed files with 301 additions and 100 deletions

View File

@@ -95,6 +95,7 @@ void outFunc(char *str, void *arg) {
pTecsDriv pMe;
float fVal;
Buffer buffer;
ObPar *pPar;
self = (pEVControl)pData;
assert(self);
@@ -136,7 +137,10 @@ void outFunc(char *str, void *arg) {
iRet = EVCGetPar(self, "upperlimit", &fVal);
if (abs(fVal - atof(result)) > 1.0e-4 * abs(fVal)) {
fVal = atof(result);
iRet = EVCSetPar(self, "upperlimit", fVal,pCon);
pPar = ObParFind(self->pParam,"upperlimit");
if (pPar != NULL) {
pPar->fVal = fVal;
}
}
iRet = EVControlWrapper(pCon,pSics,pData,argc,argv);
if (iRet != 0) {
@@ -161,7 +165,15 @@ void outFunc(char *str, void *arg) {
sprintf(pBueffel,"WARNING: upper limit reduced to maximal allowed value: %g", fVal);
SCWrite(pCon,pBueffel,eWarning);
}
iRet = EVCSetPar(self, "upperlimit", fVal,pCon);
if (argc == 3) {
iRet = EVCSetPar(self, "upperlimit", fVal,pCon);
} else {
pPar = ObParFind(self->pParam,"upperlimit");
if (pPar != NULL) {
pPar->fVal = fVal;
}
iRet = 1;
}
if (iRet) {
sprintf(pBueffel,"%s.%s = %s\n",self->pName,
argv[1],result);
@@ -478,5 +490,5 @@ void outFunc(char *str, void *arg) {
pMe->EVLimits=pEvc->pDrivInt->CheckLimits; /* save original CheckLimits function */
pEvc->pDrivInt->CheckLimits=TecsLimits;
EVCSetPar(pEvc,"upperlimit",1800.0,pCon);
EVCSetPar(pEvc,"lowerlimit",0.01,pCon);
EVCSetPar(pEvc,"lowerlimit",0.0,pCon);
}