From cad8ffc0c68bb8b0b2d393f9fa02213d47ca949f Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 10 Mar 2017 13:07:33 +0100 Subject: [PATCH] resolved the recovering from receiver start error , but still does not acknowledge error in gui --- slsDetectorSoftware/slsDetector/slsDetector.cpp | 10 +++++++--- slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp | 8 ++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 29a47558d..0d81233ca 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -7708,9 +7708,13 @@ int slsDetector::startReceiver(){ setErrorMask((getErrorMask())|(COULDNOT_START_RECEIVER)); } } - //let detector prepare anyway even if receiver didnt work - if((thisDetector->myDetectorType !=JUNGFRAU)) - ret=detectorSendToReceiver(true); + + //let detector prepare anyway even if receiver didnt work (for those not using the receiver) + if((thisDetector->myDetectorType != JUNGFRAU)) { + int ret1 = detectorSendToReceiver(true); + if (ret != FAIL) + ret = ret1; + } return ret; } diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp b/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp index 9c23a4249..1f135b039 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp @@ -226,9 +226,6 @@ int slsDetectorUtils::acquire(int delflag){ for (int ip=0; ip0) { @@ -298,7 +295,7 @@ int slsDetectorUtils::acquire(int delflag){ //start receiver if(startReceiver() == FAIL) { - cout << "Start receiver failed " << endl; + cout << "Start receiver failed " << endl; stopReceiver(); *stoppedFlag=1; pthread_mutex_unlock(&mg);//cout << "unlock"<< endl; @@ -308,6 +305,9 @@ int slsDetectorUtils::acquire(int delflag){ cout << "Receiver started " << endl; #endif pthread_mutex_unlock(&mg);//cout << "unlock"<< endl; + + //let processing thread listen to these packets + sem_post(&sem_newRTAcquisition); } #ifdef VERBOSE cout << "Acquiring " << endl;