mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-28 09:10:01 +02:00
rate correction for eiger implemented
This commit is contained in:
commit
3c4b0c24c8
@ -22,7 +22,7 @@
|
|||||||
#define HEADERLENGTH 12
|
#define HEADERLENGTH 12
|
||||||
|
|
||||||
#define DEFAULT_SUBFRAME_EXPOSURE_VAL 2621440 /** default value for sub frame value 2.6ms*/
|
#define DEFAULT_SUBFRAME_EXPOSURE_VAL 2621440 /** default value for sub frame value 2.6ms*/
|
||||||
#define MAX_SUBFRAME_EXPOSURE_VAL 0x1FFFFFFF /** 29 bit register for max subframe exposure value */
|
#define MAX_SUBFRAME_EXPOSURE_VAL_IN_10NS 0x1FFFFFFF /** 29 bit register for max subframe exposure value */
|
||||||
|
|
||||||
/** maximum rois */
|
/** maximum rois */
|
||||||
#define MAX_ROIS 100
|
#define MAX_ROIS 100
|
||||||
|
@ -174,7 +174,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;
|
unsigned int i;
|
||||||
Feb_Control_module_number = 0;
|
Feb_Control_module_number = 0;
|
||||||
Feb_Control_current_index = 0;
|
Feb_Control_current_index = 0;
|
||||||
@ -182,19 +182,7 @@ int Feb_Control_Init(int master, int top){
|
|||||||
//global send
|
//global send
|
||||||
Feb_Control_AddModule1(0,1,0xff,0,1);
|
Feb_Control_AddModule1(0,1,0xff,0,1);
|
||||||
Feb_Control_PrintModuleList();
|
Feb_Control_PrintModuleList();
|
||||||
|
Feb_Control_module_number = (module_num & 0xFF);
|
||||||
//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);
|
|
||||||
|
|
||||||
int serial = !top;
|
int serial = !top;
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ int Feb_Control_GetModuleNumber();
|
|||||||
|
|
||||||
|
|
||||||
void Feb_Control_FebControl();
|
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_ReadSetUpFileToAddModules(char* file_name);
|
||||||
int Feb_Control_ReadSetUpFile(unsigned int module_num, char* file_name);
|
int Feb_Control_ReadSetUpFile(unsigned int module_num, char* file_name);
|
||||||
int Feb_Control_CheckSetup();
|
int Feb_Control_CheckSetup();
|
||||||
|
@ -140,7 +140,7 @@ int initDetector(){
|
|||||||
getModuleConfiguration();
|
getModuleConfiguration();
|
||||||
Feb_Interface_FebInterface();
|
Feb_Interface_FebInterface();
|
||||||
Feb_Control_FebControl();
|
Feb_Control_FebControl();
|
||||||
Feb_Control_Init(master,top);
|
Feb_Control_Init(master,top,getDetectorNumber());
|
||||||
printf("FEB Initialization done\n");
|
printf("FEB Initialization done\n");
|
||||||
Beb_Beb();
|
Beb_Beb();
|
||||||
printf("BEB Initialization done\n");
|
printf("BEB Initialization done\n");
|
||||||
@ -181,7 +181,7 @@ int initDetectorStop(){
|
|||||||
getModuleConfiguration();
|
getModuleConfiguration();
|
||||||
Feb_Interface_FebInterface();
|
Feb_Interface_FebInterface();
|
||||||
Feb_Control_FebControl();
|
Feb_Control_FebControl();
|
||||||
Feb_Control_Init(master,top);
|
Feb_Control_Init(master,top,getDetectorNumber());
|
||||||
printf("FEB Initialization done\n");
|
printf("FEB Initialization done\n");
|
||||||
/* Beb_Beb(-1);
|
/* Beb_Beb(-1);
|
||||||
printf("BEB constructor done\n");*/
|
printf("BEB constructor done\n");*/
|
||||||
|
@ -47,7 +47,7 @@ void checkFirmwareCompatibility(){
|
|||||||
cprintf(BLUE,"\n\n********************************************************\n"
|
cprintf(BLUE,"\n\n********************************************************\n"
|
||||||
"**********************EIGER Server**********************\n"
|
"**********************EIGER Server**********************\n"
|
||||||
"********************************************************\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));
|
getDetectorId(DETECTOR_FIRMWARE_VERSION), getDetectorId(DETECTOR_SOFTWARE_VERSION));
|
||||||
|
|
||||||
//check for firmware version compatibility
|
//check for firmware version compatibility
|
||||||
@ -2538,7 +2538,7 @@ int set_timer(int file_des) {
|
|||||||
switch(ind) {
|
switch(ind) {
|
||||||
#ifdef EIGERD
|
#ifdef EIGERD
|
||||||
case SUBFRAME_ACQUISITION_TIME:
|
case SUBFRAME_ACQUISITION_TIME:
|
||||||
if (tns > MAX_SUBFRAME_EXPOSURE_VAL ){
|
if (tns > (MAX_SUBFRAME_EXPOSURE_VAL_IN_10NS*10) ){
|
||||||
ret=FAIL;
|
ret=FAIL;
|
||||||
strcpy(mess,"Sub Frame exposure time should not exceed 5.368 seconds\n");
|
strcpy(mess,"Sub Frame exposure time should not exceed 5.368 seconds\n");
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user