SICS-488: In monitor controlled acquisitions normalise the slave counts
against slave time and monitor time and set slave time = monitor time. r3625 | ffr | 2012-06-29 16:15:04 +1000 (Fri, 29 Jun 2012) | 3 lines
This commit is contained in:
committed by
Douglas Clowes
parent
9ef0bb8afd
commit
683e73b4e0
@@ -231,10 +231,11 @@ static int MMCCTransfer(void *pData, SConnection *pCon){
|
|||||||
int i, retVal = OKOK, status;
|
int i, retVal = OKOK, status;
|
||||||
char pBueffel[132];
|
char pBueffel[132];
|
||||||
pCounter pCount = NULL;
|
pCounter pCount = NULL;
|
||||||
pCounter pCountController = NULL;
|
pCounter pCountController = NULL, pCountSlave;
|
||||||
pMultiCounter self = NULL;
|
pMultiCounter self = NULL;
|
||||||
int tclStatus;
|
int tclStatus;
|
||||||
int controlMonitor;
|
int controlMonitor;
|
||||||
|
double avCntRt;
|
||||||
|
|
||||||
pCount = (pCounter)pData;
|
pCount = (pCounter)pData;
|
||||||
if(pCount != NULL){
|
if(pCount != NULL){
|
||||||
@@ -251,6 +252,13 @@ static int MMCCTransfer(void *pData, SConnection *pCon){
|
|||||||
sprintf(pBueffel,"WARNING: slave histogram %d failed to transfer data",
|
sprintf(pBueffel,"WARNING: slave histogram %d failed to transfer data",
|
||||||
i);
|
i);
|
||||||
SCWrite(pCon,pBueffel,eWarning);
|
SCWrite(pCon,pBueffel,eWarning);
|
||||||
|
} else if (pCountController->pDriv->eMode == ePreset) {
|
||||||
|
if (i != controlMonitor) {
|
||||||
|
pCountSlave = (pCounter) self->slaveData[i];
|
||||||
|
avCntRt = pCountSlave->pDriv->lCounts[0] / pCountSlave->pDriv->fTime;
|
||||||
|
pCountSlave->pDriv->lCounts[0] = avCntRt * pCountController->pDriv->fTime;
|
||||||
|
pCountSlave->pDriv->fTime = pCountController->pDriv->fTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pCount->pDriv->fTime = pCountController->pDriv->fTime;
|
pCount->pDriv->fTime = pCountController->pDriv->fTime;
|
||||||
|
|||||||
Reference in New Issue
Block a user