diff --git a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c index f4cdf500f..6887e45ec 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c @@ -944,10 +944,12 @@ int initConfGain(int val, int imod){ printf("Setting/Getting confgain of module:%d with val:%d\n",imod,val); #endif u_int32_t addr=GAIN_REG; - bus_w(addr,val); + if(val!=-1){ + bus_w(addr,val); #ifdef VERBOSE - printf("Value sent to confGain reg is %d\n",val); + printf("Value sent to confGain reg is %d\n",val); #endif + } val=bus_r(addr); #ifdef VERBOSE printf("Value read from confGain reg is %d\n",val); diff --git a/slsDetectorSoftware/gotthardDetectorServer/mcb_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/mcb_funcs.c index 453c7e6a5..f21ed60f4 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/mcb_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/mcb_funcs.c @@ -931,7 +931,7 @@ int setSettings(int i) } #ifdef VERBOSE - printf("detector settings are %d\n",isett); + printf("detector settings are %d and confGain is %d\n",isett,initConfGainByModule(-1,-1)); #endif if (isett==UNDEFINED && thisSettings==UNINITIALIZED) ;