From af6da80cb513d87b4b7ac03b3ff1169efe12154f Mon Sep 17 00:00:00 2001 From: James Souter Date: Thu, 16 Nov 2023 09:11:42 +0000 Subject: [PATCH 1/2] base frame timestamp off epicsTS when not using driver timestamps --- PICamApp/src/ADPICam.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PICamApp/src/ADPICam.cpp b/PICamApp/src/ADPICam.cpp index e941fa9..ffafe99 100644 --- a/PICamApp/src/ADPICam.cpp +++ b/PICamApp/src/ADPICam.cpp @@ -4881,7 +4881,6 @@ void ADPICam::piHandleNewImageTask(void) int arrayCounter; int arrayCallbacks; NDArrayInfo arrayInfo; - epicsTimeStamp currentTime; PicamError error; int useDriverTimestamps; int useFrameTracking; @@ -4993,10 +4992,9 @@ void ADPICam::piHandleNewImageTask(void) PicamParameter_FrameSize, &frameSize); if (!useDriverTimestamps){ - epicsTimeGetCurrent(¤tTime); - pImage->timeStamp = currentTime.secPastEpoch - + currentTime.nsec / 1.e9; updateTimeStamp(&pImage->epicsTS); + pImage->timeStamp = pImage->epicsTS.secPastEpoch + + pImage->epicsTS.nsec / 1.e9; } else { pTimeStampValue = From 017ffdc2e9b6562411b69151fd50f6d553eca1a3 Mon Sep 17 00:00:00 2001 From: James Souter Date: Fri, 17 Nov 2023 09:12:34 +0000 Subject: [PATCH 2/2] use new updateTimeStamps method --- PICamApp/src/ADPICam.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PICamApp/src/ADPICam.cpp b/PICamApp/src/ADPICam.cpp index ffafe99..0cd5cbb 100644 --- a/PICamApp/src/ADPICam.cpp +++ b/PICamApp/src/ADPICam.cpp @@ -4992,9 +4992,7 @@ void ADPICam::piHandleNewImageTask(void) PicamParameter_FrameSize, &frameSize); if (!useDriverTimestamps){ - updateTimeStamp(&pImage->epicsTS); - pImage->timeStamp = pImage->epicsTS.secPastEpoch - + pImage->epicsTS.nsec / 1.e9; + updateTimeStamps(pImage); } else { pTimeStampValue = @@ -5010,9 +5008,9 @@ void ADPICam::piHandleNewImageTask(void) timeStampResolution, frameSize, (double)timeStampValue /(double)timeStampResolution); + updateTimeStamps(pImage); pImage->timeStamp = (double)timeStampValue / (double)timeStampResolution; - updateTimeStamp(&pImage->epicsTS); } // use frame tracking for UniqueID if requested if (!useFrameTracking) {