mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 09:15:54 +01:00
added calibrate pedestal for gotthard
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@456 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@@ -2286,6 +2286,11 @@ int resetCounterBlock(int startACQ){
|
||||
}
|
||||
|
||||
|
||||
|
||||
int calibratePedestal(int frames){
|
||||
|
||||
printf("In Calibrate Pedestal\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -142,6 +142,11 @@ int setSynchronization(int s);
|
||||
int loadImage(int index, short int ImageVals[]);
|
||||
int readCounterBlock(int startACQ, short int CounterVals[]);
|
||||
int resetCounterBlock(int startACQ);
|
||||
|
||||
int calibratePedestal(int frames);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
u_int32_t setNBits(u_int32_t);
|
||||
|
||||
@@ -184,6 +184,7 @@ int function_table() {
|
||||
flist[F_RESET_COUNTER_BLOCK]=&reset_counter_block;
|
||||
flist[F_START_RECEIVER]=&start_receiver;
|
||||
flist[F_STOP_RECEIVER]=&stop_receiver;
|
||||
flist[F_CALIBRATE_PEDESTAL]=&calibrate_pedestal;
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -2963,3 +2964,44 @@ int stop_receiver(int file_des) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int calibrate_pedestal(int file_des){
|
||||
|
||||
int ret=OK;
|
||||
int retval=-1;
|
||||
int n;
|
||||
int frames;
|
||||
|
||||
sprintf(mess,"Could not calibrate pedestal\n");
|
||||
|
||||
n = receiveDataOnly(file_des,&frames,sizeof(frames));
|
||||
if (n < 0) {
|
||||
sprintf(mess,"Error reading from socket\n");
|
||||
ret=FAIL;
|
||||
}
|
||||
|
||||
if (ret==OK) {
|
||||
if (differentClients==1 && lockStatus==1) {
|
||||
ret=FAIL;
|
||||
sprintf(mess,"Detector locked by %s\n",lastClientIP);
|
||||
} else
|
||||
ret=calibratePedestal(frames);
|
||||
}
|
||||
|
||||
if(ret==OK){
|
||||
if (differentClients)
|
||||
ret=FORCE_UPDATE;
|
||||
}
|
||||
|
||||
/* send answer */
|
||||
/* send OK/failed */
|
||||
n = sendDataOnly(file_des,&ret,sizeof(ret));
|
||||
if (ret==FAIL)
|
||||
n += sendDataOnly(file_des,mess,sizeof(mess));
|
||||
else
|
||||
n += sendDataOnly(file_des,&retval,sizeof(retval));
|
||||
|
||||
/*return ok/fail*/
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -90,4 +90,7 @@ int reset_counter_block(int);
|
||||
int start_receiver(int);
|
||||
int stop_receiver(int);
|
||||
|
||||
|
||||
int calibrate_pedestal(int);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user