diff --git a/diffscan.c b/diffscan.c index 315bcb19..1ab4254f 100644 --- a/diffscan.c +++ b/diffscan.c @@ -254,6 +254,9 @@ static float normalizeEntry(pCountEntry pCount, pCountEntry last, pCount->Monitors[i] = (pCount->Monitors[i] - last->Monitors[i]) * fScale; } + fScale = pCount->fTime - last->fTime; + if (fScale > 0) + value /= fScale; return value; } @@ -369,9 +372,9 @@ static int DiffScanTask(void *pData) /* print progress */ - snprintf(pBueffel, 255, "%5d %12.4f %12.4f RAW: %10ld %10ld", + snprintf(pBueffel, 255, "%5d %12.4f %12.4f RAW: %10ld %10ld %10.3f", self->scanObject->iCounts - 1, - fPos, countValue, rawCount, rawMon); + fPos, countValue, rawCount, rawMon, data->fTime); SCWrite(self->scanObject->pCon, pBueffel, eLog); InvokeCallBack(self->scanObject->pCall, SCANPOINT, self->scanObject); traceSys("diffscan","RUN: pos, count, rawcount, rawmon: %f, %d, %d, %d", diff --git a/stdscan.c b/stdscan.c index 06da3638..e88d2ff8 100644 --- a/stdscan.c +++ b/stdscan.c @@ -540,7 +540,7 @@ int WriteScanPoints(pScanData self, int iPoint) strlcat(pLine, pItem,1024); snprintf(pItem,sizeof(pItem)-1, "%-11ld ", pData->Monitors[2]); strlcat(pLine, pItem,1024); - snprintf(pItem,sizeof(pItem)-1, "%-5.1f ", pData->fTime); + snprintf(pItem,sizeof(pItem)-1, "%-8.3f ", pData->fTime); strlcat(pLine, pItem,1024); } fprintf(self->fd, "%s\n", pLine);