mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-08 19:10:42 +02:00
ensure receiver is updated when detector timer values are updated (force_update)
This commit is contained in:
parent
332b0d221b
commit
1f9dc775f6
@ -1367,7 +1367,7 @@ unsigned int Feb_Control_GetNExposures(){return Feb_Control_nimages;}
|
|||||||
|
|
||||||
int Feb_Control_SetExposureTime(double the_exposure_time_in_sec){
|
int Feb_Control_SetExposureTime(double the_exposure_time_in_sec){
|
||||||
Feb_Control_exposure_time_in_sec = the_exposure_time_in_sec;
|
Feb_Control_exposure_time_in_sec = the_exposure_time_in_sec;
|
||||||
printf("Exposure time set to: %f\n",Feb_Control_exposure_time_in_sec);
|
printf("Exposure time set to: %fs\n",Feb_Control_exposure_time_in_sec);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
double Feb_Control_GetExposureTime(){return Feb_Control_exposure_time_in_sec;}
|
double Feb_Control_GetExposureTime(){return Feb_Control_exposure_time_in_sec;}
|
||||||
|
Binary file not shown.
@ -896,7 +896,8 @@ int64_t setTimer(enum timerIndex ind, int64_t val){
|
|||||||
if(val >= 0){
|
if(val >= 0){
|
||||||
printf(" Setting acq period: %fs\n",val/(1E9));
|
printf(" Setting acq period: %fs\n",val/(1E9));
|
||||||
Feb_Control_SetExposurePeriod(val/(1E9));
|
Feb_Control_SetExposurePeriod(val/(1E9));
|
||||||
}return (Feb_Control_GetExposurePeriod()*(1E9));
|
}
|
||||||
|
return (Feb_Control_GetExposurePeriod()*(1E9));
|
||||||
/* case DELAY_AFTER_TRIGGER:
|
/* case DELAY_AFTER_TRIGGER:
|
||||||
if(val >= 0)
|
if(val >= 0)
|
||||||
EigerSetNumberOfExposures((unsigned int)val);
|
EigerSetNumberOfExposures((unsigned int)val);
|
||||||
|
@ -1636,8 +1636,8 @@ int multiSlsDetector::startAndReadAllNoWait(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ret1;
|
return ret1;
|
||||||
|
/*
|
||||||
/* hanging randomly around 4000-5000 frames at 1sec exptime (threads dont return)
|
// hanging randomly around 4000-5000 frames at 1sec exptime (threads dont return)
|
||||||
int i=0;
|
int i=0;
|
||||||
int ret=OK;
|
int ret=OK;
|
||||||
int posmin=0, posmax=thisMultiDetector->numberOfDetectors;
|
int posmin=0, posmax=thisMultiDetector->numberOfDetectors;
|
||||||
@ -1683,7 +1683,7 @@ int multiSlsDetector::startAndReadAllNoWait(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4017,10 +4017,11 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){
|
|||||||
//send acquisiton period/frame number to receiver
|
//send acquisiton period/frame number to receiver
|
||||||
if((index==FRAME_NUMBER)||(index==FRAME_PERIOD)||(index==CYCLES_NUMBER)){
|
if((index==FRAME_NUMBER)||(index==FRAME_PERIOD)||(index==CYCLES_NUMBER)){
|
||||||
if(ret != FAIL){
|
if(ret != FAIL){
|
||||||
|
retval = thisDetector->timerValue[index];
|
||||||
if(setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG){
|
if(setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG){
|
||||||
int64_t args[2];
|
int64_t args[2];
|
||||||
args[1] = retval;
|
args[1] = retval;
|
||||||
if(t == -1) args[1] = -1;
|
if((t == -1) && (ret!= FORCE_UPDATE)) args[1] = -1;
|
||||||
|
|
||||||
if((index==FRAME_NUMBER)||(index==CYCLES_NUMBER)){
|
if((index==FRAME_NUMBER)||(index==CYCLES_NUMBER)){
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
@ -4047,11 +4048,11 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){
|
|||||||
if(index==FRAME_PERIOD){
|
if(index==FRAME_PERIOD){
|
||||||
//exptime sent if acq period = 0
|
//exptime sent if acq period = 0
|
||||||
if(retval){
|
if(retval){
|
||||||
cout << "ERROR:Acquisition Period in receiver set incorrectly to " << ut << " instead of " << retval << endl;
|
cout << "ERROR:Acquisition Period in receiver set incorrectly to " << ut << " instead of " << thisDetector->timerValue[index] << endl;
|
||||||
setErrorMask((getErrorMask())|(RECEIVER_ACQ_PERIOD_NOT_SET));
|
setErrorMask((getErrorMask())|(RECEIVER_ACQ_PERIOD_NOT_SET));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
cout << "ERROR:Number of Frames (* Number of cycles) in receiver set incorrectly to " << ut << " instead of " << retval << endl;
|
cout << "ERROR:Number of Frames (* Number of cycles) in receiver set incorrectly to " << ut << " instead of " << thisDetector->timerValue[index] << endl;
|
||||||
setErrorMask((getErrorMask())|(RECEIVER_FRAME_NUM_NOT_SET));
|
setErrorMask((getErrorMask())|(RECEIVER_FRAME_NUM_NOT_SET));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3964,7 +3964,6 @@ string slsDetectorCommand::cmdTimer(int narg, char *args[], int action) {
|
|||||||
if (index==ACQUISITION_TIME || index==SUBFRAME_ACQUISITION_TIME || index==FRAME_PERIOD || index==DELAY_AFTER_TRIGGER)
|
if (index==ACQUISITION_TIME || index==SUBFRAME_ACQUISITION_TIME || index==FRAME_PERIOD || index==DELAY_AFTER_TRIGGER)
|
||||||
rval=(double)ret*1E-9;
|
rval=(double)ret*1E-9;
|
||||||
else rval=ret;
|
else rval=ret;
|
||||||
|
|
||||||
|
|
||||||
//set frame index
|
//set frame index
|
||||||
if (index==FRAME_NUMBER || index==CYCLES_NUMBER ){
|
if (index==FRAME_NUMBER || index==CYCLES_NUMBER ){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user