mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
ensuring vthreshold returns the right value
This commit is contained in:
parent
2e701168b9
commit
bc6dfca552
Binary file not shown.
@ -320,10 +320,26 @@ int detectorTest( enum digitalTestMode arg){
|
||||
void setDAC(enum detDacIndex ind, int val, int imod, int mV, int retval[]){
|
||||
|
||||
if(ind == VTHRESHOLD){
|
||||
int ret[4];
|
||||
setDAC(VCMP_LL,val,imod,mV,retval);
|
||||
ret[0] = retval[mV];
|
||||
setDAC(VCMP_LR,val,imod,mV,retval);
|
||||
ret[1] = retval[mV];
|
||||
setDAC(VCMP_RL,val,imod,mV,retval);
|
||||
ind = VCMP_RR;
|
||||
ret[2] = retval[mV];
|
||||
setDAC(VCMP_RL,val,imod,mV,retval);
|
||||
ret[3] = retval[mV];
|
||||
|
||||
if((ret[0]== ret[1])&&
|
||||
(ret[1]==ret[2])&&
|
||||
(ret[2]==ret[3]))
|
||||
cprintf(GREEN,"vthreshold match\n");
|
||||
else{
|
||||
retval[0] = -1;retval[1] = -1;
|
||||
cprintf(RED,"vthreshold mismatch 0:%d 1:%d 2:%d 3:%d\n",
|
||||
ret[0],ret[1],ret[2],ret[3]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
char iname[10];
|
||||
|
||||
|
@ -2161,6 +2161,8 @@ dacs_t slsDetector::setDAC(dacs_t val, dacIndex index, int mV, int imod){
|
||||
|
||||
|
||||
dacs_t retval[2];
|
||||
retval[0] = -1;
|
||||
retval[1] = -1;
|
||||
int fnum=F_SET_DAC;
|
||||
int ret=FAIL;
|
||||
char mess[100];
|
||||
|
Loading…
x
Reference in New Issue
Block a user