diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 77871a4b9..1814a70b3 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -4194,10 +4194,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; @@ -4221,6 +4227,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(); }