From 2c4265d4934aff04f3ce04130b43ff750718247d Mon Sep 17 00:00:00 2001 From: James Souter Date: Thu, 16 Nov 2023 10:10:02 +0000 Subject: [PATCH 1/2] base frame timestamp off epicsTS --- andorApp/src/andorCCD.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/andorApp/src/andorCCD.cpp b/andorApp/src/andorCCD.cpp index abecd28..66a0b8a 100755 --- a/andorApp/src/andorCCD.cpp +++ b/andorApp/src/andorCCD.cpp @@ -1538,7 +1538,6 @@ void AndorCCD::dataTask(void) size_t dims[2]; int nDims = 2; int i; - epicsTimeStamp startTime; NDArray *pArray; int autoSave; int readOutMode; @@ -1618,7 +1617,6 @@ void AndorCCD::dataTask(void) setIntegerParam(ADNumImagesCounter, numImagesCounter); // If array callbacks are enabled then read data into NDArray, do callbacks if (arrayCallbacks) { - epicsTimeGetCurrent(&startTime); // Allocate an NDArray dims[0] = sizeX; dims[1] = sizeY; @@ -1649,8 +1647,8 @@ void AndorCCD::dataTask(void) } /* Put the frame number and time stamp into the buffer */ pArray->uniqueId = imageCounter; - pArray->timeStamp = startTime.secPastEpoch + startTime.nsec / 1.e9; updateTimeStamp(&pArray->epicsTS); + pArray->timeStamp = pArray->epicsTS.secPastEpoch + pArray->epicsTS.nsec / 1.e9; /* Get any attributes that have been defined for this driver */ this->getAttributes(pArray->pAttributeList); /* Call the NDArray callback */ From 9a077b07043aee644e529bfcb9ca0ce255fd4a6e Mon Sep 17 00:00:00 2001 From: James Souter Date: Fri, 17 Nov 2023 09:17:23 +0000 Subject: [PATCH 2/2] use new updateTimeStamps method --- andorApp/src/andorCCD.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/andorApp/src/andorCCD.cpp b/andorApp/src/andorCCD.cpp index 66a0b8a..f7cb4e4 100755 --- a/andorApp/src/andorCCD.cpp +++ b/andorApp/src/andorCCD.cpp @@ -1647,8 +1647,7 @@ void AndorCCD::dataTask(void) } /* Put the frame number and time stamp into the buffer */ pArray->uniqueId = imageCounter; - updateTimeStamp(&pArray->epicsTS); - pArray->timeStamp = pArray->epicsTS.secPastEpoch + pArray->epicsTS.nsec / 1.e9; + updateTimeStamps(pArray); /* Get any attributes that have been defined for this driver */ this->getAttributes(pArray->pAttributeList); /* Call the NDArray callback */