mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-10 12:00:43 +02:00
probes was screwing up gotthard data, changed in places to be only for data
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@429 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -971,36 +971,7 @@ int64_t getTrains(){
|
||||
|
||||
|
||||
int64_t setProbes(int64_t value){
|
||||
int ow;
|
||||
int nm=setNMod(-1);
|
||||
switch (getDynamicRange()) {
|
||||
case 32:
|
||||
ow=1;
|
||||
break;
|
||||
case 16:
|
||||
ow=2;
|
||||
break;
|
||||
case 8:
|
||||
ow=3;
|
||||
break;
|
||||
case 4:
|
||||
ow=4;
|
||||
break;
|
||||
case 1:
|
||||
ow=5;
|
||||
break;
|
||||
default:
|
||||
ow=1;
|
||||
break;
|
||||
}
|
||||
if (value>=0) {
|
||||
setCSregister(ALLMOD);
|
||||
initChipWithProbes(0, ow,value, ALLMOD);
|
||||
putout("0000000000000000",ALLMOD);
|
||||
setNMod(nm);
|
||||
getDynamicRange(); // needed to change dataBytes
|
||||
}
|
||||
return getProbes();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1068,15 +1039,7 @@ int loadImage(int index, short int ImageVals[]){
|
||||
|
||||
|
||||
int64_t getProbes(){
|
||||
u_int32_t shiftin=bus_r(GET_SHIFT_IN_REG);
|
||||
u_int32_t np=(shiftin >>PROBES_OFF) & PROBES_MASK;
|
||||
#ifdef VERYVERBOSE
|
||||
printf("%08x ",shiftin);
|
||||
printf("probes==%01x\n",np);
|
||||
#endif
|
||||
|
||||
return np;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2121,7 +2121,8 @@ int set_timer(int file_des) {
|
||||
retval=setGates(tns);
|
||||
break;
|
||||
case PROBES_NUMBER:
|
||||
retval=setProbes(tns);
|
||||
sprintf(mess,"can't set timer for gotthard\n");
|
||||
ret=FAIL;
|
||||
break;
|
||||
case CYCLES_NUMBER:
|
||||
retval=setTrains(tns);
|
||||
@ -2142,7 +2143,6 @@ int set_timer(int file_des) {
|
||||
if (ret!=OK) {
|
||||
printf(mess);
|
||||
printf("set timer failed\n");
|
||||
sprintf(mess, "set timer %d failed\n", ind);
|
||||
} else if (ind==FRAME_NUMBER) {
|
||||
ret=allocateRAM();
|
||||
if (ret!=OK)
|
||||
|
@ -3385,6 +3385,8 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){
|
||||
//std::cout<< "offline " << std::endl;
|
||||
if (t>=0)
|
||||
thisDetector->timerValue[index]=t;
|
||||
if(thisDetector->myDetectorType==GOTTHARD)
|
||||
thisDetector->timerValue[PROBES_NUMBER]=0;
|
||||
}
|
||||
} else {
|
||||
if (t>=0)
|
||||
@ -3393,17 +3395,15 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){
|
||||
#ifdef VERBOSE
|
||||
std::cout<< "Timer " << index << " set to "<< thisDetector->timerValue[index] << "ns" << std::endl;
|
||||
#endif
|
||||
if (index==PROBES_NUMBER) {
|
||||
|
||||
if ((thisDetector->myDetectorType==MYTHEN)&&(index==PROBES_NUMBER)) {
|
||||
setDynamicRange();
|
||||
//cout << "Changing probes: data size = " << thisDetector->dataBytes <<endl;
|
||||
}
|
||||
|
||||
/* set progress */
|
||||
if ((index==FRAME_NUMBER) || (index==CYCLES_NUMBER)) {
|
||||
|
||||
setTotalProgress();
|
||||
|
||||
|
||||
}
|
||||
|
||||
return thisDetector->timerValue[index];
|
||||
@ -3826,7 +3826,7 @@ int slsDetector::setDynamicRange(int n){
|
||||
updateDetector();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if(thisDetector->myDetectorType==MYTHEN){
|
||||
if (n>0)
|
||||
thisDetector->dynamicRange=n;
|
||||
retval=thisDetector->dynamicRange;
|
||||
|
Reference in New Issue
Block a user