- 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:
cvs
2000-06-30 14:16:52 +00:00
parent 604c8baf19
commit 006f10741c
12 changed files with 149 additions and 64 deletions

View File

@ -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;