From 71ba531999c42f84b3942b430bf80e0ffad4a3ed Mon Sep 17 00:00:00 2001 From: Mark Rivers Date: Tue, 28 Feb 2023 09:02:22 -0600 Subject: [PATCH] Fix logic waiting for camera actually being done --- andorApp/src/andorCCD.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/andorApp/src/andorCCD.cpp b/andorApp/src/andorCCD.cpp index 2f993b1..da70eed 100755 --- a/andorApp/src/andorCCD.cpp +++ b/andorApp/src/andorCCD.cpp @@ -1686,11 +1686,13 @@ void AndorCCD::dataTask(void) // Now clear main thread flag mAcquiringData = 0; setIntegerParam(ADAcquire, 0); - // Wait for the status thread to set ADStatus to something other than ADStatusAcquire + // Wait for detector to actually stop acquiring while (1) { - epicsInt32 acquireStatus; - getIntegerParam(ADStatus, &acquireStatus); - if (acquireStatus != ADStatusAcquire) break; + int value; + unsigned int uvalue; + checkStatus(GetStatus(&value)); + uvalue = static_cast(value); + if (uvalue != ASAcquiring) break; epicsThreadSleep(0.01); }