From 8c123982d28b3d54a9f794c1d37186a5396cc042 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 8 Dec 2017 11:50:10 +0100 Subject: [PATCH] get detector and receiver status only when necessary for stopacquisition --- slsDetectorSoftware/slsDetector/slsDetector.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 10437bc74..1af8e6076 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -4104,10 +4104,16 @@ int slsDetector::startAcquisition(){ }; + + int slsDetector::stopAcquisition(){ - runStatus s = getRunStatus(); - runStatus r = getReceiverStatus(); + // get status before stopping acquisition + runStatus s = ERROR, r = ERROR; + if (thisDetector->receiver_upstream) { + s = getRunStatus(); + r = getReceiverStatus(); + } int fnum=F_STOP_ACQUISITION; int ret=FAIL; @@ -4131,6 +4137,7 @@ int slsDetector::stopAcquisition(){ } thisDetector->stoppedFlag=1; + // if rxr streaming and acquisition finished, restream dummy stop packet if ((thisDetector->receiver_upstream) && (s == IDLE) && (r == IDLE)) { restreamStopFromReceiver(); }