fixed some probelems wuth scans for receiver and also scans for allframes/frameindex

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@654 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2013-08-16 12:59:42 +00:00
parent 97aa35a388
commit 3098664c8f
10 changed files with 38 additions and 33 deletions

View File

@ -421,7 +421,7 @@ void* postProcessing::processData(int delflag) {
*/
int prevCaught=0;
int prevCaught=-1;
int caught=0;
bool newData=false;
char currentfName[MAX_STR_LENGTH]="";
@ -483,7 +483,7 @@ void* postProcessing::processData(int delflag) {
//get data
strcpy(currentfName,"");
pthread_mutex_lock(&mg);
int* receiverData = readFrameFromReceiver(currentfName,currentfIndex);
int* receiverData = readFrameFromReceiver(currentfName,currentfIndex);//if(currentfIndex!=-1)cout<<"--currentfIndex:"<<currentfIndex<<endl;
pthread_mutex_unlock(&mg);
if(setReceiverOnline()==OFFLINE_FLAG)
receiverData = NULL;
@ -494,14 +494,14 @@ void* postProcessing::processData(int delflag) {
// determine if new Data for nth frame read
if (read_freq){
//delete if not new data
if (caught <= prevCaught)
currentfIndex = -1;
#ifdef VERBOSE
std::cout << "caught:" << caught << " prevcaught:" << prevCaught << std::endl;
#endif
prevCaught=caught;
//delete if not new data
if((caught == prevCaught) || (caught == -1))
currentfIndex = -1;
else if (currentfIndex!=-1)
prevCaught=caught;
}
//not garbage frame