scan/diffscan enhancements to do with timestamps
This commit is contained in:
@ -254,6 +254,9 @@ static float normalizeEntry(pCountEntry pCount, pCountEntry last,
|
|||||||
pCount->Monitors[i] =
|
pCount->Monitors[i] =
|
||||||
(pCount->Monitors[i] - last->Monitors[i]) * fScale;
|
(pCount->Monitors[i] - last->Monitors[i]) * fScale;
|
||||||
}
|
}
|
||||||
|
fScale = pCount->fTime - last->fTime;
|
||||||
|
if (fScale > 0)
|
||||||
|
value /= fScale;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -369,9 +372,9 @@ static int DiffScanTask(void *pData)
|
|||||||
/*
|
/*
|
||||||
print progress
|
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,
|
self->scanObject->iCounts - 1,
|
||||||
fPos, countValue, rawCount, rawMon);
|
fPos, countValue, rawCount, rawMon, data->fTime);
|
||||||
SCWrite(self->scanObject->pCon, pBueffel, eLog);
|
SCWrite(self->scanObject->pCon, pBueffel, eLog);
|
||||||
InvokeCallBack(self->scanObject->pCall, SCANPOINT, self->scanObject);
|
InvokeCallBack(self->scanObject->pCall, SCANPOINT, self->scanObject);
|
||||||
traceSys("diffscan","RUN: pos, count, rawcount, rawmon: %f, %d, %d, %d",
|
traceSys("diffscan","RUN: pos, count, rawcount, rawmon: %f, %d, %d, %d",
|
||||||
|
@ -540,7 +540,7 @@ int WriteScanPoints(pScanData self, int iPoint)
|
|||||||
strlcat(pLine, pItem,1024);
|
strlcat(pLine, pItem,1024);
|
||||||
snprintf(pItem,sizeof(pItem)-1, "%-11ld ", pData->Monitors[2]);
|
snprintf(pItem,sizeof(pItem)-1, "%-11ld ", pData->Monitors[2]);
|
||||||
strlcat(pLine, pItem,1024);
|
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);
|
strlcat(pLine, pItem,1024);
|
||||||
}
|
}
|
||||||
fprintf(self->fd, "%s\n", pLine);
|
fprintf(self->fd, "%s\n", pLine);
|
||||||
|
Reference in New Issue
Block a user