mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
fixed the undefined state of gui when acquisition stopped
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@545 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -5862,6 +5862,7 @@ int slsDetector::setFileIndex(int i) {
|
||||
int retval=-1;
|
||||
int arg = i;
|
||||
|
||||
|
||||
if(thisDetector->receiverOnlineFlag==OFFLINE_FLAG){
|
||||
if(i>=0)
|
||||
fileIO::setFileIndex(i);
|
||||
@ -6340,3 +6341,10 @@ int slsDetector::setReadReceiverFrequency(int i){
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
void slsDetector::waitForReceiverReadToFinish(){
|
||||
if(dataSocket)
|
||||
while(dataSocket->getsocketDescriptor() >= 0)
|
||||
usleep(1000);
|
||||
}
|
||||
|
@ -1600,6 +1600,11 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
|
||||
*/
|
||||
int setReadReceiverFrequency(int i=-1);
|
||||
|
||||
/**
|
||||
* Waits for receiver read to finish after stopping acquisition
|
||||
*/
|
||||
void waitForReceiverReadToFinish();
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
@ -318,9 +318,9 @@ void slsDetectorUtils::acquire(int delflag){
|
||||
closeDataFile();
|
||||
}
|
||||
|
||||
}else{
|
||||
while(stopReceiver()!=OK);
|
||||
}
|
||||
}else
|
||||
stopReceiver();
|
||||
|
||||
pthread_mutex_unlock(&mg);
|
||||
|
||||
|
||||
|
@ -680,6 +680,12 @@ virtual ROI* getROI(int &n)=0;
|
||||
virtual int setReadReceiverFrequency(int i=-1)=0;
|
||||
|
||||
|
||||
/**
|
||||
* Waits for receiver read to finish after stopping acquisition
|
||||
*/
|
||||
virtual void waitForReceiverReadToFinish()=0;
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
Reference in New Issue
Block a user