diff --git a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c index 71a089ffe..3f4ff6c8f 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c @@ -852,8 +852,7 @@ int setDACRegister(int idac, int val, int imod) { } -float getTemperature(int tempSensor, int imod) -{ +float getTemperature(int tempSensor, int imod){ float val; char cTempSensor[2][100]={"ADCs/ASICs","VRs/FPGAs"}; imod=0;//ignoring more than 1 mod for now @@ -863,31 +862,59 @@ float getTemperature(int tempSensor, int imod) #ifdef VERBOSE printf("Getting Temperature of module:%d for the %s\n",imod,cTempSensor[tempSensor]); #endif - bus_w(TEMP_SPI_IN,(T1_CLK_BIT)|(T1_CS_BIT)|(T2_CLK_BIT)|(T2_CS_BIT));//standby - bus_w(TEMP_SPI_IN,(T1_CLK_BIT)&~(T1_CS_BIT)|(T2_CLK_BIT));//high clk low cs + bus_w(TEMP_IN_REG,(T1_CLK_BIT)|(T1_CS_BIT)|(T2_CLK_BIT)|(T2_CS_BIT));//standby + bus_w(TEMP_IN_REG,(T1_CLK_BIT)&~(T1_CS_BIT)|(T2_CLK_BIT));//high clk low cs for(k=0;k<2;k++){ for(i=0;i=0 && imod=0 && imod=getNModBoard()) @@ -852,51 +852,52 @@ int set_dac(int fnum) { case TEMPERATURE_FPGA: itemp=TEMP_FPGA; break; + case HV_POT: + itemp=HIGH_VOLTAGE; + break; default: - printf("Unknown DAC/POT/TEMP index %d\n",ind); - sprintf(mess,"Unknown DAC/POT/TEMP index %d\n",ind); + printf("Unknown DAC/TEMP/HV index %d\n",ind); + sprintf(mess,"Unknown DAC/TEMP/HV index %d\n",ind); ret=FAIL; } if (ret==OK) { - if(itemp!=-1) { - if (imod>=0 && imod