- Final fix for FOCUS problem

This commit is contained in:
koennecke
2010-06-04 14:38:00 +00:00
parent 1ae7c0c2e2
commit 2b9df3d05a
3 changed files with 3 additions and 8 deletions

View File

@ -33,7 +33,6 @@ pHMdata makeHMData(void)
} }
memset(self, 0, sizeof(HMdata)); memset(self, 0, sizeof(HMdata));
self->nTimeChan = 1; self->nTimeChan = 1;
self->updateFlag = 1;
return self; return self;
} }
@ -84,7 +83,7 @@ int resizeBuffer(pHMdata self)
return 0; return 0;
} }
memset(self->localBuffer, 0, size * sizeof(HistInt)); memset(self->localBuffer, 0, size * sizeof(HistInt));
self->updateFlag = 1; self->nextUpdate = 0;
return 1; return 1;
} }
@ -258,7 +257,7 @@ long getHMDataLength(pHMdata self)
/*---------------------------------------------------------------------*/ /*---------------------------------------------------------------------*/
void updateHMData(pHMdata self) void updateHMData(pHMdata self)
{ {
self->updateFlag = 1; self->nextUpdate = 0;
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
@ -274,7 +273,7 @@ void updateHMData(pHMdata self)
--------------------------------------------------------------------------*/ --------------------------------------------------------------------------*/
static int mustUpdate(pHMdata self) static int mustUpdate(pHMdata self)
{ {
if (self->updateFlag == 1 && time(NULL) >= self->nextUpdate) { if (time(NULL) >= self->nextUpdate) {
return 1; return 1;
} else { } else {
return 0; return 0;
@ -300,7 +299,6 @@ static int updateHMbuffer(pHistMem hist, int bank, SConnection * pCon)
self->localBuffer); self->localBuffer);
if (status == OKOK) { if (status == OKOK) {
self->nextUpdate = time(NULL) + self->updateIntervall; self->nextUpdate = time(NULL) + self->updateIntervall;
self->updateFlag = 0;
break; break;
} else { } else {
status = hist->pDriv->GetError(hist->pDriv, &iErr, pError, 79); status = hist->pDriv->GetError(hist->pDriv, &iErr, pError, 79);

View File

@ -24,7 +24,6 @@ typedef struct __hmdata {
int tofMode; int tofMode;
time_t nextUpdate; time_t nextUpdate;
int updateIntervall; int updateIntervall;
int updateFlag;
HistInt *localBuffer; HistInt *localBuffer;
struct __hmdata *timeslave; struct __hmdata *timeslave;
} HMdata, *pHMdata; } HMdata, *pHMdata;

View File

@ -733,8 +733,6 @@ static void putHistogramMemory(SConnection * pCon, SicsInterp * pSics,
*/ */
start = 0; start = 0;
length = GetHistLength(mem); length = GetHistLength(mem);
subset = 1;
updateHMDim(self, mem); updateHMDim(self, mem);
/* /*