From 3f5bda16741a7281145512403cc5d82407024042 Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Thu, 13 Sep 2012 08:58:45 +0000 Subject: [PATCH] added trimbit mask git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@254 951219d9-93cf-4727-9268-0efd64621fa3 --- slsDetectorSoftware/commonFiles/sls_detector_defs.h | 2 ++ slsDetectorSoftware/slsDetector/slsDetector.cpp | 2 +- slsDetectorSoftware/slsDetectorAnalysis/energyConversion.cpp | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) 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);