mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 12:57:13 +02:00
users:double for time in ns, bugfix:readframe wen no gui, return ok for config
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@564 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -440,39 +440,43 @@ void* postProcessing::processData(int delflag) {
|
||||
if(setReceiverOnline()==OFFLINE_FLAG)
|
||||
caught=prevCaught;
|
||||
incrementProgress(caught-prevCaught);
|
||||
if(caught-prevCaught) newData=true;
|
||||
else newData=false;
|
||||
prevCaught=caught;
|
||||
|
||||
if (checkJoinThread()) break;
|
||||
|
||||
//read frame if new data
|
||||
if(newData){
|
||||
strcpy(currentfName,"");
|
||||
pthread_mutex_lock(&mg);
|
||||
int* receiverData = readFrameFromReceiver(currentfName,currentfIndex);
|
||||
pthread_mutex_unlock(&mg);
|
||||
if(setReceiverOnline()==OFFLINE_FLAG)
|
||||
receiverData = NULL;
|
||||
if(receiverData == NULL){
|
||||
currentfIndex = -1;
|
||||
cout<<"****Detector Data returned is NULL***"<<endl;
|
||||
}
|
||||
//not garbage frame
|
||||
if(currentfIndex>=0){
|
||||
fdata=decodeData(receiverData);
|
||||
delete [] receiverData;
|
||||
if(fdata){
|
||||
if (dataReady) {
|
||||
thisData=new detectorData(fdata,NULL,NULL,getCurrentProgress(),currentfName,getTotalNumberOfChannels());
|
||||
dataReady(thisData, currentfIndex, pCallbackArg);
|
||||
delete thisData;
|
||||
fdata=NULL;
|
||||
if (dataReady){
|
||||
|
||||
if(caught-prevCaught) newData=true;
|
||||
else newData=false;
|
||||
prevCaught=caught;
|
||||
|
||||
//read frame if new data
|
||||
if (newData){
|
||||
strcpy(currentfName,"");
|
||||
pthread_mutex_lock(&mg);
|
||||
int* receiverData = readFrameFromReceiver(currentfName,currentfIndex);
|
||||
pthread_mutex_unlock(&mg);
|
||||
if(setReceiverOnline()==OFFLINE_FLAG)
|
||||
receiverData = NULL;
|
||||
if(receiverData == NULL){
|
||||
currentfIndex = -1;
|
||||
cout<<"****Detector Data returned is NULL***"<<endl;
|
||||
}
|
||||
//not garbage frame
|
||||
if(currentfIndex>=0){
|
||||
fdata=decodeData(receiverData);
|
||||
delete [] receiverData;
|
||||
if(fdata){
|
||||
if (dataReady) {
|
||||
thisData=new detectorData(fdata,NULL,NULL,getCurrentProgress(),currentfName,getTotalNumberOfChannels());
|
||||
dataReady(thisData, currentfIndex, pCallbackArg);
|
||||
delete thisData;
|
||||
fdata=NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
;//cout<<"****Detector returned mismatched indices/garbage or acquisition is over. Trying again.***"<<endl;
|
||||
else{
|
||||
;//cout<<"****Detector returned mismatched indices/garbage or acquisition is over. Trying again.***"<<endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user