- Fixed various bugs in evcontroller relating to bad access after
initialization failure. - Fixed a bug in scan.c which causes scan to go in an endless loop when SICS failed to start a motor. - Fixed a bug in motor.c which caused bad softwarelimits after changes to the softzero. - Started changes in choco* in order incorporate normal parameters and an environment driver.
This commit is contained in:
9
motor.c
9
motor.c
@ -517,7 +517,7 @@ extern void KillPiPiezo(void *pData);
|
||||
ObPar *pPar = NULL;
|
||||
char pBueffel[512];
|
||||
int iRet;
|
||||
float fLimit;
|
||||
float fLimit, fOld, fChange;
|
||||
|
||||
assert(self);
|
||||
assert(pCon);
|
||||
@ -525,18 +525,21 @@ extern void KillPiPiezo(void *pData);
|
||||
if(strcmp(name,"softzero") == 0)
|
||||
{
|
||||
/* set it first, this also tests the necessary privileges */
|
||||
fOld = ObVal(self->ParArray,SZERO);
|
||||
iRet = ObParSet(self->ParArray,self->name,name,fVal,pCon);
|
||||
if(!iRet)
|
||||
{
|
||||
return iRet;
|
||||
}
|
||||
/* shift the limits by the difference between old and new */
|
||||
fChange = fVal - fOld;
|
||||
/* upper limit */
|
||||
fLimit = ObVal(self->ParArray,SUPP);
|
||||
fLimit -= fVal;
|
||||
fLimit -= fChange;
|
||||
ObParSet(self->ParArray,self->name,"softupperlim",fLimit,pCon);
|
||||
/* lower limit */
|
||||
fLimit = ObVal(self->ParArray,SLOW);
|
||||
fLimit -= fVal;
|
||||
fLimit -= fChange;
|
||||
ObParSet(self->ParArray,self->name,"softlowerlim",fLimit,pCon);
|
||||
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user