diff --git a/slsDetectorSoftware/eigerDetectorServer/FebControl.c b/slsDetectorSoftware/eigerDetectorServer/FebControl.c index b4f505486..fc30fa5ce 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebControl.c +++ b/slsDetectorSoftware/eigerDetectorServer/FebControl.c @@ -166,7 +166,7 @@ void Feb_Control_FebControl(){ -int Feb_Control_Init(int master, int top){ +int Feb_Control_Init(int master, int top, int module_num){ unsigned int i; Feb_Control_module_number = 0; Feb_Control_current_index = 0; @@ -174,19 +174,7 @@ int Feb_Control_Init(int master, int top){ //global send Feb_Control_AddModule1(0,1,0xff,0,1); Feb_Control_PrintModuleList(); - - //get module nummber - int res=0; - char hostname[100]; - if (gethostname(hostname, sizeof hostname) == 0) - puts(hostname); - else - perror("gethostname"); - char *pch; - pch = strtok(hostname,"0"); - pch = strtok(NULL,"0"); - sscanf(pch,"%d",&res); - Feb_Control_module_number = (res & 0xFF); + Feb_Control_module_number = (module_num & 0xFF); int serial = !top; diff --git a/slsDetectorSoftware/eigerDetectorServer/FebControl.h b/slsDetectorSoftware/eigerDetectorServer/FebControl.h index dfaf15969..14c81a61c 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebControl.h +++ b/slsDetectorSoftware/eigerDetectorServer/FebControl.h @@ -111,7 +111,7 @@ int Feb_Control_GetModuleNumber(); void Feb_Control_FebControl(); - int Feb_Control_Init(int master, int top); + int Feb_Control_Init(int master, int top, int module_num); int Feb_Control_ReadSetUpFileToAddModules(char* file_name); int Feb_Control_ReadSetUpFile(unsigned int module_num, char* file_name); int Feb_Control_CheckSetup(); diff --git a/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServer b/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServer index 1b41fd966..a55086f53 100755 Binary files a/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServer and b/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServer differ diff --git a/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c b/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c index 641915968..d730a234d 100644 --- a/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c @@ -140,7 +140,7 @@ int initDetector(){ getModuleConfiguration(); Feb_Interface_FebInterface(); Feb_Control_FebControl(); - Feb_Control_Init(master,top); + Feb_Control_Init(master,top,getDetectorNumber()); printf("FEB Initialization done\n"); Beb_Beb(); printf("BEB Initialization done\n"); @@ -181,7 +181,7 @@ int initDetectorStop(){ getModuleConfiguration(); Feb_Interface_FebInterface(); Feb_Control_FebControl(); - Feb_Control_Init(master,top); + Feb_Control_Init(master,top,getDetectorNumber()); printf("FEB Initialization done\n"); /* Beb_Beb(-1); printf("BEB constructor done\n");*/ diff --git a/slsDetectorSoftware/slsDetectorServer/slsDetectorServer_funcs.c b/slsDetectorSoftware/slsDetectorServer/slsDetectorServer_funcs.c index 9ad5aa578..78c164015 100755 --- a/slsDetectorSoftware/slsDetectorServer/slsDetectorServer_funcs.c +++ b/slsDetectorSoftware/slsDetectorServer/slsDetectorServer_funcs.c @@ -46,7 +46,7 @@ void checkFirmwareCompatibility(){ cprintf(BLUE,"\n\n********************************************************\n" "**********************EIGER Server**********************\n" "********************************************************\n"); - cprintf(BLUE,"\nFirmware Version: %llx\nSoftware Version: %llx\n\n", + cprintf(BLUE,"\nFirmware Version: %lld\nSoftware Version: %lld\n\n", getDetectorId(DETECTOR_FIRMWARE_VERSION), getDetectorId(DETECTOR_SOFTWARE_VERSION)); //check for firmware version compatibility