- Introduced a state filed into first generation objects

- Fixed some issues with error returns not being properly handled in devexec
- Fixed a bug in motorlist which caused limit checks to fail
- Fixed an issue with the TDCHM not properly updating the counter
  values on finish
- Readded getHipadabaPar in ChainCallback as this caused a problem in ei
- Made tasdrive ignore sgu, sgl when out of plane not allowed
This commit is contained in:
koennecke
2013-05-23 08:54:55 +00:00
parent 966f8e30a8
commit 32baca27f3
3 changed files with 21 additions and 1 deletions

View File

@ -20,6 +20,10 @@
* fixed in the old module.
*
* Mark Koennecke, February 2013
*
* Go to maximum or minimum value for mt when limit problem do not abort
*
* Mark Koennecke, April 2013
*/
#include <math.h>
#include <sics.h>
@ -223,6 +227,7 @@ static void startMono(pSICSOBJ self, SConnection *pCon)
float d2r, d2l, mtx;
peigerMono mono = (peigerMono)self->pPrivate;
hdbValue mta, mtb;
float lim;
assert(mono != NULL);
@ -314,6 +319,16 @@ static void startMono(pSICSOBJ self, SConnection *pCon)
SICSHdbGetPar(self,pCon,"MTA",&mta);
SICSHdbGetPar(self,pCon,"MTB",&mtb);
mtx = mta.v.doubleValue + mtb.v.doubleValue*pow(curve,.75);
MotorGetPar((pMotor)mono->motData[MTX],"softupperlim",&lim);
if(mtx > lim){
SCPrintf(pCon,eLog,"WARNING: correcting mt target %f to %f within upper limit", mtx, lim-.1);
mtx = lim - .1;
}
MotorGetPar((pMotor)mono->motData[MTX],"softlowerlim",&lim);
if(mtx < lim){
SCPrintf(pCon,eLog,"WARNING: correcting mt target %f to %f within lower limit", mtx, lim +.1);
mtx = lim + .1;
}
status = startTASMotor((pMotor)mono->motData[MTX], pCon, "mt",
mtx, silent,stopFixed);
if (status < 0 && status != NOTSTARTED) {

View File

@ -209,7 +209,7 @@ static int SinqHttpConfigure(pHistDriver self, SConnection * pCon,
status = StringDictGet(pOpt,"tricsswap", buffer, sizeof(buffer));
if(status == 1){
pPriv->tricsswap = 1;
pPriv->tricsswap = atoi(buffer);
}
/*
actually do configure
@ -596,6 +596,8 @@ static int SinqHttpGetHistogram(pHistDriver self, SConnection * pCon,
if(pPriv->tricsswap == 1){
swapTrics(data, self->data, end-start);
} else if(pPriv->tricsswap == 2) {
memcpy(data,hmdata,(end-start)*sizeof(HistInt));
}
return 1;
}

View File

@ -319,6 +319,9 @@ static int TDCCountStatus(pHistDriver self, SConnection * pCon)
leave it for now.
*/
if (status == HWIdle || status == HWFault) {
if(tdc->counter != NULL){
tdc->counter->pDriv->ReadValues(tdc->counter->pDriv);
}
InvokeCallBack(tdc->counter->pCall,COUNTEND,NULL);
tdcstatus = disableTdc(tdc);
if (tdcstatus != 1) {