- Fixed a bug at the new counter driver

This commit is contained in:
cvs
2003-08-08 07:30:43 +00:00
parent 0e420a12f7
commit a9d5607fea
9 changed files with 629 additions and 55 deletions

View File

@ -21,18 +21,18 @@
#include <time.h>
#include <ctype.h>
#include <tcl.h>
#include "fortify.h"
#include "sics.h"
#include "sicsvar.h"
#include "counter.h"
#include "motor.h"
#include "scan.h"
#include "scan.i"
#include "psi/tas.h"
#include "psi/tasu.h"
#include "evcontroller.h"
#include "splitter.h"
#include "status.h"
#include <fortify.h>
#include <sics.h>
#include <sicsvar.h>
#include <counter.h>
#include <motor.h>
#include <scan.h>
#include <scan.i>
#include "tas.h"
#include "tasu.h"
#include <evcontroller.h>
#include <splitter.h>
#include <status.h>
/*------------------------------------------------------------------------
a little local utility for making a line of characters
@ -201,8 +201,8 @@ static int TASHeader(pScanData self)
pTAS->tasPar[SM]->iVal,
pTAS->tasPar[SS]->iVal,
pTAS->tasPar[SA]->iVal);
fprintf(self->fd,"PARAM: FX=%3f, KFIX=%8.4f\n",
pTAS->tasPar[FX]->fVal,
fprintf(self->fd,"PARAM: FX=%3d, KFIX=%8.4f\n",
pTAS->tasPar[FX]->iVal,
pTAS->tasPar[KF]->fVal);
fprintf(self->fd,"PARAM: ALF1=%8.4f, ALF2=%8.4f, ALF3=%8.4f, ALF4=%8.4f\n",
pTAS->tasPar[ALF1]->fVal,
@ -371,7 +371,11 @@ static int TASHeader(pScanData self)
*/
for(i = 0; i < pTAS->addCount; i++)
{
strcat(pBueffel,"F9.4,1X,");
if(i == pTAS->addCount -1){
strcat(pBueffel,"F9.4");
} else {
strcat(pBueffel,"F9.4,1X,");
}
if(pTAS->addType[i] == 1) /* motor */
{
strcpy(pWork2,tasMotorOrder[pTAS->addOutput[i]]);
@ -466,6 +470,13 @@ static int TASScanPoint(pScanData self, int iPoint)
{
fVal = -9999.77;
}
}
else
{
if(pVar->pInter != NULL)
{
fVal = pVar->pInter->GetValue(pVar->pObject,self->pCon);
}
}
}
else if((iPtr = isTASVar(pVar->Name)) >= 0 )
@ -473,7 +484,7 @@ static int TASScanPoint(pScanData self, int iPoint)
fVal = pTAS->tasPar[iPtr]->fVal;
}
}
sprintf(pWork,"%8.4f ", fVal);
sprintf(pWork,"%9.4f ", fVal);
strcat(pBueffel,pWork);
}
@ -485,7 +496,7 @@ static int TASScanPoint(pScanData self, int iPoint)
m3 = GetMonitor(self->pCounterData,3,self->pCon);
cnts = GetCounts(self->pCounterData,self->pCon);
fVal = GetCountTime(self->pCounterData, self->pCon);
sprintf(pWork,"%8d %8d %9.4f %8d %8d ",m1,m2,fVal, cnts, m3);
sprintf(pWork,"%8d %8d %9.2f %8d %8d ",m1,m2,fVal, cnts, m3);
strcat(pBueffel,pWork);
/*
@ -855,7 +866,7 @@ static int AddTASScanVar(pScanData self, SicsInterp *pSics, SConnection *pCon,
/* got everything, fill in the VarEntry structure */
strcpy(pVar.Name,name);
pVar.pInter = NULL;
pVar.pInter = GetDrivableInterface(pData);
pVar.pObject = pData;
pVar.fStart = fStart;
pVar.fStep = fStep;