- Fixed a couple of compiler found bugs generated by the new C compiler
- Added support to tasinit for status display part of tas-application
This commit is contained in:
35
tasscan.c
35
tasscan.c
@@ -466,7 +466,7 @@ static int TASScanPoint(pScanData self, int iPoint)
|
||||
*/
|
||||
m1 = GetMonitor(self->pCounterData,1,self->pCon);
|
||||
m2 = GetMonitor(self->pCounterData,2,self->pCon);
|
||||
m1 = GetMonitor(self->pCounterData,3,self->pCon);
|
||||
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);
|
||||
@@ -576,7 +576,7 @@ static int TASScanDrive(pScanData self, int iPoint)
|
||||
status = TASCalc(pTAS,self->pCon,tasMask,
|
||||
tasTargets, tasTargetMask);
|
||||
if(!status)
|
||||
return;
|
||||
return 0;
|
||||
TASStart(pTAS,self->pCon,
|
||||
self->pSics,tasTargets,tasTargetMask);
|
||||
/*
|
||||
@@ -974,7 +974,7 @@ static int EnterScanVar(pTASdata pTAS, char *name, float fCenter,
|
||||
{
|
||||
int iPtr;
|
||||
char pIncrement[30], pError[132];
|
||||
float fIncrement, fStart;
|
||||
float fIncrement, fStart, fTemp;
|
||||
|
||||
/*
|
||||
get increment
|
||||
@@ -996,6 +996,18 @@ static int EnterScanVar(pTASdata pTAS, char *name, float fCenter,
|
||||
*/
|
||||
fStart = fCenter - (pTAS->pScan->iNP/2) * fIncrement;
|
||||
|
||||
/*
|
||||
If step > 0 save it for scaninfo
|
||||
*/
|
||||
if(fIncrement < 0)
|
||||
fTemp = -fIncrement;
|
||||
else
|
||||
fTemp = fIncrement;
|
||||
if(fTemp > .001 && strlen(pTAS->scanVar) < 2)
|
||||
{
|
||||
sprintf(pTAS->scanVar,"%s,%f,%f",name,fStart,fIncrement);
|
||||
}
|
||||
|
||||
/*
|
||||
put it in
|
||||
*/
|
||||
@@ -1272,6 +1284,7 @@ int TASScan(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
clear out old scan
|
||||
*/
|
||||
ClearScanVar(pTAS->pScan);
|
||||
pTAS->scanVar[0] = '\0';
|
||||
|
||||
/*
|
||||
at this stage all simple variables have been set. Now we get the values
|
||||
@@ -1292,6 +1305,22 @@ int TASScan(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
if(!status)
|
||||
return status;
|
||||
|
||||
/*
|
||||
check if there is something to scan
|
||||
*/
|
||||
if(pTAS->pScan->iScanVar < 1)
|
||||
{
|
||||
SCWrite(pCon,"ERROR: nothing to scan",eError);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
now there is enough information to set the scaninfo variable which
|
||||
is needed to help the status display.
|
||||
*/
|
||||
sprintf(pWork,"%d,%s",pTAS->pScan->iNP,pTAS->scanVar);
|
||||
VarSetText(pTAS->tasPar[SINFO],pWork,0);
|
||||
|
||||
/*
|
||||
parse the output variable in order to get additional stuff to write
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user