diff --git a/slsDetectorSoftware/commonFiles/sls_detector_defs.h b/slsDetectorSoftware/commonFiles/sls_detector_defs.h index 6f0d65627..84a5c1c63 100755 --- a/slsDetectorSoftware/commonFiles/sls_detector_defs.h +++ b/slsDetectorSoftware/commonFiles/sls_detector_defs.h @@ -349,6 +349,8 @@ enum channelRegisterBit { ANALOG_SIGNAL_ENABLE=0x200, /**< mask of the analogue output enable bit */ CALIBRATION_ENABLE=0x300, /**< mask of the calibration input enable bit */ }; + +#define TRIMBITMASK 0x3f /** meaning of the chip register bits \see ::sls_detector_chip diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 92515b7a2..e27d44653 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -2823,7 +2823,7 @@ int slsDetector::getChanRegs(double* retval,bool fromDetector){ //the original array has 0 initialized if(chanregs){ for (int i=0; ichanregs[ichip*nch+ichan]|=ival&0x3f; + myMod->chanregs[ichip*nch+ichan]|=ival&TRIMBITMASK; break; case 1: #ifdef VERBOSE @@ -297,7 +297,7 @@ int energyConversion::writeSettingsFile(string fname, detectorType myDetectorTyp outfile << names[idac] << " " << iv1 << std::endl; for (ichan=0; ichan>nb);