From 1ed40179889fea448e6ed545b9edc4b5284ec17c Mon Sep 17 00:00:00 2001 From: l_msdetect Date: Mon, 6 May 2013 14:17:09 +0000 Subject: [PATCH] moench great stuff git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@541 951219d9-93cf-4727-9268-0efd64621fa3 --- .../slsReceiver/slsReceiverFunctionList.cpp | 16 ++++++++++------ .../slsReceiver/slsReceiver_funcs.cpp | 12 ++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp index f854dfa0e..c872982bf 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp +++ b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp @@ -148,9 +148,12 @@ int slsReceiverFunctionList::getFrameIndex(){ int slsReceiverFunctionList::getAcquisitionIndex(){ if(startAcquisitionIndex==-1) acquisitionIndex=0; - else + else{ + if(myDetectorType == MOENCH) + acquisitionIndex=(currframenum - startAcquisitionIndex); +else acquisitionIndex=(currframenum - startAcquisitionIndex)/packetsPerFrame; - + } return acquisitionIndex; } @@ -357,11 +360,12 @@ int slsReceiverFunctionList::startListening(){ //start for each scan if(startFrameIndex==-1){ if(!frameIndexOffset) - startFrameIndex = (int)(*((int*)buffer)); + startFrameIndex = ((int)(*((int*)buffer)))- packetsPerFrame; else - startFrameIndex = (((int)(*((int*)buffer))) & (frameIndexMask)) >> frameIndexOffset; + startFrameIndex = ((((int)(*((int*)buffer))) & (frameIndexMask)) >> frameIndexOffset)-1; - startFrameIndex -= packetsPerFrame; + //startFrameIndex -= packetsPerFrame; + // startFrameIndex -=1; //cout<<"startFrameIndex:"<> frameIndexOffset; //currframenum = (int)(*((int*)wbuf)); - //cout<<"**************curreframenm:"<> MOENCH_FRAME_INDEX_OFFSET; - cout<<"this frame number:"<= 0)){ // if(packetIndex == 1){ @@ -1061,9 +1061,9 @@ int slsReceiverFuncs::moench_read_frame(){ iPacket++; packetOffset = packetOffset + offset + onePacketSize; }*/ - cout<<"found or exited"<