mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
implemented high voltage for normal modules
This commit is contained in:
@ -1258,21 +1258,23 @@ int set_dac(int file_des) {
|
||||
printf("DAC set to %d in dac units and %d mV\n", retval[0],retval[1]);
|
||||
#endif
|
||||
|
||||
if(ret == OK){
|
||||
//takes time to set high voltage, so no check for it
|
||||
if(ret == OK && ind != HV_POT && ind != HV_NEW){
|
||||
if(mV)
|
||||
temp = retval[1];
|
||||
else
|
||||
temp = retval[0];
|
||||
if ((abs(temp-val)<=5) || val==-1) {
|
||||
ret=OK;
|
||||
if (differentClients)
|
||||
ret=FORCE_UPDATE;
|
||||
} else {
|
||||
ret=FAIL;
|
||||
printf("Setting dac %d of module %d: wrote %d but read %d\n", idac, imod, val, temp);
|
||||
}
|
||||
}
|
||||
|
||||
if(ret == OK && differentClients)
|
||||
ret=FORCE_UPDATE;
|
||||
|
||||
|
||||
/* send answer */
|
||||
/* send OK/failed */
|
||||
|
Reference in New Issue
Block a user