get the last frame in eiger with acquiringdone

This commit is contained in:
Dhanya Maliakal 2015-02-24 16:10:31 +01:00
parent d658799b20
commit 2c2d2171d2
5 changed files with 22 additions and 14 deletions

View File

@ -190,8 +190,8 @@ int Feb_Control_Init(int master, int top){
//get serial //get serial
int serial=1; int serial=1;
switch(Feb_Control_module_number){ switch(Feb_Control_module_number){
case 34: serial = 0; break; //martin case 34: serial = 0; break; //martin half
case 31: serial = 0; break; //dhanya case 31: serial = 0; break; //martin
case 26: serial = 0; break; //leo case 26: serial = 0; break; //leo
case 32: serial = 1; break; case 32: serial = 1; break;
case 24: serial = 2; break; case 24: serial = 2; break;

View File

@ -1,6 +1,6 @@
CC = powerpc-4xx-softfloat-gcc CC = powerpc-4xx-softfloat-gcc
CCX = powerpc-4xx-softfloat-g++ CCX = powerpc-4xx-softfloat-g++
CFLAGS += -Wall -DDACS_INT -DEIGERD -DSLS_DETECTOR_FUNCTION_LIST -DDACS_INT #-DSTOP_SERVER #-DVERBOSE #-DVIRTUAL -DPCCOMPILE CFLAGS += -Wall -DDACS_INT -DEIGERD -DSLS_DETECTOR_FUNCTION_LIST -DDACS_INT -DSTOP_SERVER #-DVERBOSE #-DVIRTUAL -DPCCOMPILE
LDLIBS += -lm -lstdc++ LDLIBS += -lm -lstdc++
PROGS = eigerDetectorServer PROGS = eigerDetectorServer

View File

@ -149,6 +149,7 @@ int initDetector(){
int initDetectorStop(){ int initDetectorStop(){
getModuleConfiguration(); getModuleConfiguration();
Feb_Interface_FebInterface(); Feb_Interface_FebInterface();
Feb_Control_FebControl();
Feb_Control_Init(master,top); Feb_Control_Init(master,top);
printf("FEB Initialization done\n"); printf("FEB Initialization done\n");
/* Beb_Beb(-1); /* Beb_Beb(-1);

View File

@ -532,18 +532,24 @@ void* postProcessing::processData(int delflag) {
//updating progress //updating progress
if(currentfIndex != -1) if(currentfIndex != -1)
setCurrentProgress(currentfIndex+1); setCurrentProgress(currentfIndex+1);
/** IF detector acquisition is done, let the acquire() thread know to finish up and force join thread */
if(acquiringDone == 1){
#ifdef VERY_VERY_DEBUG #ifdef VERY_VERY_DEBUG
cout << "currentfIndex:" << currentfIndex << endl;
#endif
/** IF detector acquisition is done, let the acquire() thread know to finish up and force join thread */
if(acquiringDone > 0){
#ifdef VERY_VERY_DEBUG
if(acquiringDone == 1)
cout << "acquiring seems to be done" << endl; cout << "acquiring seems to be done" << endl;
#endif #endif
//so that only once it checks for last frame and then next time, checks join thread //so that it checks for last frame for some number of checks, then checks join thread
pthread_mutex_lock(&mg); pthread_mutex_lock(&mg);
acquiringDone = 2; acquiringDone++;
#ifdef VERY_VERY_DEBUG
cout << "acquiringDone :" << acquiringDone << endl;
#endif
pthread_mutex_unlock(&mg); pthread_mutex_unlock(&mg);
//newData = true; //newData = true;
}else if (acquiringDone == 2){ if (acquiringDone == 10){//for eiger, it is very slow, have to wait long to get last frame
#ifdef VERY_VERY_DEBUG #ifdef VERY_VERY_DEBUG
cout << "gonna post for it to end" << endl; cout << "gonna post for it to end" << endl;
#endif #endif
@ -552,6 +558,7 @@ void* postProcessing::processData(int delflag) {
cout << "Sem posted" << endl; cout << "Sem posted" << endl;
#endif #endif
//newData = false; //newData = false;
}
}else if (checkJoinThread()) }else if (checkJoinThread())
break; break;