highvoltage again

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@59 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2011-11-22 17:19:58 +00:00
parent 798ff206c1
commit 7de31bbe93
2 changed files with 30 additions and 17 deletions

View File

@ -878,8 +878,10 @@ int set_dac(int fnum) {
printf("DAC/TEMP/HV set to %f V\n", retval);
#endif
ret=FAIL;
if((itemp==HIGH_VOLTAGE)&&(retval!=-1))
ret =OK;
if (itemp==HIGH_VOLTAGE){
if (retval!=-1)
ret=OK;
}
else if (retval==val || val==-1)
ret=OK;
@ -887,7 +889,7 @@ int set_dac(int fnum) {
printf("Setting dac/hv %d of module %d: wrote %f but read %f\n", ind, imod, val, retval);
/* send answer */
/* send answer */
/* send OK/failed */
n = sendDataOnly(&ret,sizeof(ret));
if (ret==OK) {