mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-05 17:40:40 +02:00
get the last frame in eiger with acquiringdone
This commit is contained in:
parent
d658799b20
commit
2c2d2171d2
@ -190,8 +190,8 @@ int Feb_Control_Init(int master, int top){
|
||||
//get serial
|
||||
int serial=1;
|
||||
switch(Feb_Control_module_number){
|
||||
case 34: serial = 0; break; //martin
|
||||
case 31: serial = 0; break; //dhanya
|
||||
case 34: serial = 0; break; //martin half
|
||||
case 31: serial = 0; break; //martin
|
||||
case 26: serial = 0; break; //leo
|
||||
case 32: serial = 1; break;
|
||||
case 24: serial = 2; break;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CC = powerpc-4xx-softfloat-gcc
|
||||
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++
|
||||
|
||||
PROGS = eigerDetectorServer
|
||||
|
Binary file not shown.
@ -149,6 +149,7 @@ int initDetector(){
|
||||
int initDetectorStop(){
|
||||
getModuleConfiguration();
|
||||
Feb_Interface_FebInterface();
|
||||
Feb_Control_FebControl();
|
||||
Feb_Control_Init(master,top);
|
||||
printf("FEB Initialization done\n");
|
||||
/* Beb_Beb(-1);
|
||||
|
@ -532,26 +532,33 @@ void* postProcessing::processData(int delflag) {
|
||||
//updating progress
|
||||
if(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
|
||||
cout << "acquiring seems to be done" << endl;
|
||||
cout << "currentfIndex:" << currentfIndex << endl;
|
||||
#endif
|
||||
//so that only once it checks for last frame and then next time, checks join thread
|
||||
/** 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;
|
||||
#endif
|
||||
//so that it checks for last frame for some number of checks, then checks join thread
|
||||
pthread_mutex_lock(&mg);
|
||||
acquiringDone = 2;
|
||||
acquiringDone++;
|
||||
#ifdef VERY_VERY_DEBUG
|
||||
cout << "acquiringDone :" << acquiringDone << endl;
|
||||
#endif
|
||||
pthread_mutex_unlock(&mg);
|
||||
//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
|
||||
cout << "gonna post for it to end" << endl;
|
||||
cout << "gonna post for it to end" << endl;
|
||||
#endif
|
||||
sem_post(&sem_queue);
|
||||
sem_post(&sem_queue);
|
||||
#ifdef VERY_VERY_DEBUG
|
||||
cout << "Sem posted" << endl;
|
||||
cout << "Sem posted" << endl;
|
||||
#endif
|
||||
//newData = false;
|
||||
//newData = false;
|
||||
}
|
||||
}else if (checkJoinThread())
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user