change to server for no serial to work

This commit is contained in:
Dhanya Maliakal 2015-03-30 15:36:55 +02:00
parent ea4f596077
commit 031ccdf070
3 changed files with 19 additions and 19 deletions

View File

@ -187,15 +187,13 @@ int Feb_Control_Init(int master, int top){
sscanf(pch,"%d",&res);
Feb_Control_module_number = (res & 0xFF);
int serial = top;
/*
//for Gemmas modules: if master, serial 0, else 1
int serial = 1;
if(master)
serial = 0;
/* else if(top)if slave top, serial = 2
serial = 2;*/
switch(Feb_Control_module_number){
case 34: serial = 0; break; //martin half
case 26: serial = 0; break; //leo
@ -212,7 +210,7 @@ int Feb_Control_Init(int master, int top){
case 49: serial = 0; break; // Gemma
case 48: serial = 1; break; // Gemma
}
}*/
printf("serial: %d\n",serial);
Feb_Control_current_index = 1;
@ -1071,17 +1069,17 @@ unsigned int Feb_Control_AddressToAll(){printf("in Feb_Control_AddressToAll()\n"
if(moduleSize==0) return 0;
/*
if(Module_BottomAddressIsValid(&modules[1])){
printf("************* bottom\n");
//printf("************* bottom\n");
//if(Feb_Control_am_i_master)
return Module_GetBottomLeftAddress(&modules[1])|Module_GetBottomRightAddress(&modules[1]);
// else return 0;
}
printf("************* top\n");
*/
//return Module_GetTopLeftAddress(&modules[1])|Module_GetTopRightAddress(&modules[1]);
return Module_GetTopLeftAddress(&modules[0])|Module_GetTopRightAddress(&modules[0]);
// printf("************* top\n");
return Module_GetTopLeftAddress(&modules[1])|Module_GetTopRightAddress(&modules[1]);
//return Module_GetTopLeftAddress(&modules[0])|Module_GetTopRightAddress(&modules[0]);
}

View File

@ -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 -DMARTIN
CFLAGS += -Wall -DDACS_INT -DEIGERD -DMARTIN -DSLS_DETECTOR_FUNCTION_LIST -DDACS_INT -DSTOP_SERVER #-DVERBOSE #-DVIRTUAL -DPCCOMPILE -DMARTIN
LDLIBS += -lm -lstdc++
PROGS = eigerDetectorServer

View File

@ -495,7 +495,7 @@ enum detectorSettings setSettings(enum detectorSettings sett, int imod){
int startReceiver(int d){
if(master)
//if(master)
Feb_Control_PrepareForAcquisition();
return OK;
}
@ -503,10 +503,10 @@ int startReceiver(int d){
int startStateMachine(){
int ret;
if(master){
//if(master){
printf("Going to start acquisition\n");
Feb_Control_StartAcquisition();
}
//}
//do not read status here, cannot get images then
@ -517,7 +517,7 @@ int startStateMachine(){
//if(trialMasterMode == IS_MASTER){
if(master){
//if(master){
/*
* int i=0;
if(getRunStatus() == IDLE){
@ -535,9 +535,11 @@ int startStateMachine(){
*/
while(getRunStatus() == IDLE);
printf("*****Acquiring...\n");
while(getRunStatus() == IDLE){
printf("waiting for being not idle anymore\n");
}
printf("*****Acquiring...\n");
//}
/*else usleep(1000000);
printf("****Returning\n");*/