mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 13:27:14 +02:00
stop server incl in makefile, master chosen based on top or bottom module at the moment
This commit is contained in:
@ -1049,22 +1049,30 @@ int Feb_Control_WaitForFinishedFlag(int sleep_time_us){
|
|||||||
int Feb_Control_AcquisitionInProgress(){
|
int Feb_Control_AcquisitionInProgress(){
|
||||||
unsigned int status_reg_r=0,status_reg_l=0;
|
unsigned int status_reg_r=0,status_reg_l=0;
|
||||||
|
|
||||||
|
/*printf("master right:%d\n",Feb_Control_GetDAQStatusRegister(Module_GetTopRightAddress(&modules[0]),&status_reg_r));
|
||||||
|
printf("master left:%d\n",Feb_Control_GetDAQStatusRegister(Module_GetTopLeftAddress(&modules[0]),&status_reg_l));
|
||||||
|
|
||||||
//printf("right:%d\n",Feb_Control_GetDAQStatusRegister(Module_GetTopRightAddress(&modules[1]),&status_reg_r));
|
|
||||||
//printf("left:%d\n",Feb_Control_GetDAQStatusRegister(Module_GetTopLeftAddress(&modules[1]),&status_reg_l));
|
|
||||||
|
|
||||||
|
printf("top right:%d\n",Feb_Control_GetDAQStatusRegister(Module_GetTopRightAddress(&modules[1]),&status_reg_r));
|
||||||
|
printf("top left:%d\n",Feb_Control_GetDAQStatusRegister(Module_GetTopLeftAddress(&modules[1]),&status_reg_l));
|
||||||
|
|
||||||
|
if(Module_BottomAddressIsValid(&modules[1])){
|
||||||
|
printf("bot right:%d\n",Feb_Control_GetDAQStatusRegister(Module_GetBottomRightAddress(&modules[1]),&status_reg_r));
|
||||||
|
printf("bot left:%d\n",Feb_Control_GetDAQStatusRegister(Module_GetBottomLeftAddress(&modules[1]),&status_reg_l));
|
||||||
|
}
|
||||||
|
*/
|
||||||
if(Module_BottomAddressIsValid(&modules[1])){
|
if(Module_BottomAddressIsValid(&modules[1])){
|
||||||
//printf("************* bottom1\n");
|
//printf("************* bottom1\n");
|
||||||
|
|
||||||
if(!(Feb_Control_GetDAQStatusRegister(Module_GetBottomRightAddress(&modules[1]),&status_reg_r)))
|
if(!(Feb_Control_GetDAQStatusRegister(Module_GetBottomRightAddress(&modules[1]),&status_reg_r)))
|
||||||
return 0;
|
{printf("**bottom address wrong\n");return 0;}
|
||||||
}else{
|
}else{
|
||||||
//printf("************* top1\n");
|
//printf("************* top1\n");
|
||||||
if(!(Feb_Control_GetDAQStatusRegister(Module_GetTopRightAddress(&modules[1]),&status_reg_r)))
|
if(!(Feb_Control_GetDAQStatusRegister(Module_GetTopRightAddress(&modules[1]),&status_reg_r)))
|
||||||
return 0;
|
{printf("**top address wrong\n");return 0;}
|
||||||
}
|
}
|
||||||
|
printf("runningggg 0x%x\n",status_reg_r);
|
||||||
if(status_reg_r&DAQ_STATUS_DAQ_RUNNING) return 1;
|
if(status_reg_r&DAQ_STATUS_DAQ_RUNNING) {printf("**runningggg\n");return 1;}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if(!(GetDAQStatusRegister(modules[i]->Module_GetTopLeftAddress(),status_reg_r)&&GetDAQStatusRegister(modules[i]->Module_GetTopRightAddress(),status_reg_l))){
|
if(!(GetDAQStatusRegister(modules[i]->Module_GetTopLeftAddress(),status_reg_r)&&GetDAQStatusRegister(modules[i]->Module_GetTopRightAddress(),status_reg_l))){
|
||||||
@ -1075,7 +1083,7 @@ int Feb_Control_AcquisitionInProgress(){
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*printf("**idle\n");*/return 0; //i.e. not running (status_reg_r|status_reg_l)&DAQ_STATUS_DAQ_RUNNING;
|
printf("**idle\n");return 0; //i.e. not running (status_reg_r|status_reg_l)&DAQ_STATUS_DAQ_RUNNING;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Feb_Control_Reset(){
|
int Feb_Control_Reset(){
|
||||||
|
@ -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
|
||||||
@ -36,4 +36,4 @@ beb_debug:$(SRC_CLNT3)
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(DESTDIR)/$(PROGS) *.o
|
rm -rf $(DESTDIR)/$(PROGS) *.o
|
||||||
|
|
||||||
|
Binary file not shown.
@ -133,7 +133,7 @@ int initDetector(){
|
|||||||
int enable[2] = {0,1};
|
int enable[2] = {0,1};
|
||||||
setExternalGating(enable);//disable external gating
|
setExternalGating(enable);//disable external gating
|
||||||
|
|
||||||
if(getDetectorNumber() == 0xbeb031)
|
if(!Feb_Control_IsBottomModule())
|
||||||
trialMasterMode = IS_MASTER;
|
trialMasterMode = IS_MASTER;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -521,10 +521,10 @@ int startReadOut(){
|
|||||||
enum runStatus getRunStatus(){
|
enum runStatus getRunStatus(){
|
||||||
int i = Feb_Control_AcquisitionInProgress();
|
int i = Feb_Control_AcquisitionInProgress();
|
||||||
if(i== 0){
|
if(i== 0){
|
||||||
/*printf("IDLE\n");*/
|
//printf("IDLE\n");
|
||||||
return IDLE;
|
return IDLE;
|
||||||
}else{
|
}else{
|
||||||
/*printf("RUNNING\n");*/
|
//printf("RUNNING\n");
|
||||||
return RUNNING;
|
return RUNNING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user