- 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:
15
eigermono.c
15
eigermono.c
@ -20,6 +20,10 @@
|
|||||||
* fixed in the old module.
|
* fixed in the old module.
|
||||||
*
|
*
|
||||||
* Mark Koennecke, February 2013
|
* 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 <math.h>
|
||||||
#include <sics.h>
|
#include <sics.h>
|
||||||
@ -223,6 +227,7 @@ static void startMono(pSICSOBJ self, SConnection *pCon)
|
|||||||
float d2r, d2l, mtx;
|
float d2r, d2l, mtx;
|
||||||
peigerMono mono = (peigerMono)self->pPrivate;
|
peigerMono mono = (peigerMono)self->pPrivate;
|
||||||
hdbValue mta, mtb;
|
hdbValue mta, mtb;
|
||||||
|
float lim;
|
||||||
|
|
||||||
assert(mono != NULL);
|
assert(mono != NULL);
|
||||||
|
|
||||||
@ -314,6 +319,16 @@ static void startMono(pSICSOBJ self, SConnection *pCon)
|
|||||||
SICSHdbGetPar(self,pCon,"MTA",&mta);
|
SICSHdbGetPar(self,pCon,"MTA",&mta);
|
||||||
SICSHdbGetPar(self,pCon,"MTB",&mtb);
|
SICSHdbGetPar(self,pCon,"MTB",&mtb);
|
||||||
mtx = mta.v.doubleValue + mtb.v.doubleValue*pow(curve,.75);
|
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",
|
status = startTASMotor((pMotor)mono->motData[MTX], pCon, "mt",
|
||||||
mtx, silent,stopFixed);
|
mtx, silent,stopFixed);
|
||||||
if (status < 0 && status != NOTSTARTED) {
|
if (status < 0 && status != NOTSTARTED) {
|
||||||
|
@ -209,7 +209,7 @@ static int SinqHttpConfigure(pHistDriver self, SConnection * pCon,
|
|||||||
|
|
||||||
status = StringDictGet(pOpt,"tricsswap", buffer, sizeof(buffer));
|
status = StringDictGet(pOpt,"tricsswap", buffer, sizeof(buffer));
|
||||||
if(status == 1){
|
if(status == 1){
|
||||||
pPriv->tricsswap = 1;
|
pPriv->tricsswap = atoi(buffer);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
actually do configure
|
actually do configure
|
||||||
@ -596,6 +596,8 @@ static int SinqHttpGetHistogram(pHistDriver self, SConnection * pCon,
|
|||||||
|
|
||||||
if(pPriv->tricsswap == 1){
|
if(pPriv->tricsswap == 1){
|
||||||
swapTrics(data, self->data, end-start);
|
swapTrics(data, self->data, end-start);
|
||||||
|
} else if(pPriv->tricsswap == 2) {
|
||||||
|
memcpy(data,hmdata,(end-start)*sizeof(HistInt));
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
3
tdchm.c
3
tdchm.c
@ -319,6 +319,9 @@ static int TDCCountStatus(pHistDriver self, SConnection * pCon)
|
|||||||
leave it for now.
|
leave it for now.
|
||||||
*/
|
*/
|
||||||
if (status == HWIdle || status == HWFault) {
|
if (status == HWIdle || status == HWFault) {
|
||||||
|
if(tdc->counter != NULL){
|
||||||
|
tdc->counter->pDriv->ReadValues(tdc->counter->pDriv);
|
||||||
|
}
|
||||||
InvokeCallBack(tdc->counter->pCall,COUNTEND,NULL);
|
InvokeCallBack(tdc->counter->pCall,COUNTEND,NULL);
|
||||||
tdcstatus = disableTdc(tdc);
|
tdcstatus = disableTdc(tdc);
|
||||||
if (tdcstatus != 1) {
|
if (tdcstatus != 1) {
|
||||||
|
Reference in New Issue
Block a user