added trimbit mask

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@254 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2012-09-13 08:58:45 +00:00
parent 4c8bc09143
commit 3f5bda1674
3 changed files with 5 additions and 3 deletions

View File

@@ -153,7 +153,7 @@ slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string
#ifdef VERBOSE
// std::cout<< "trimbits " << ival ;
#endif
myMod->chanregs[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<nch; ichan++) {
iv=mod.chanregs[ichip*nch+ichan];
iv1= (iv&0x3f);
iv1= (iv&TRIMBITMASK);
outfile <<iv1 << " ";
nb=9;
iv1=((iv&(1<<nb))>>nb);