Small change in the receiver concerning the data to the GUI

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@483 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
bergamaschi 2013-03-06 10:00:40 +00:00
parent bf429705bf
commit 217f63b701

View File

@ -493,23 +493,28 @@ int slsReceiverFunctionList::startWriting(){
totalFramesCaught++; totalFramesCaught++;
//currframenum = (int)(*((int*)dataWriteFrame->buffer)); //currframenum = (int)(*((int*)dataWriteFrame->buffer));
currframenum = (int)(*((int*)wbuf)); currframenum = (int)(*((int*)wbuf));
if(guiRequiresData) if(guiRequiresData) {
guiData=latestData; guiData=latestData;
else } else {
guiData=NULL; guiData=NULL;
}
if(enableFileWrite){ if(enableFileWrite){
if (writeReceiverData) if (writeReceiverData) {
writeReceiverData(wbuf,bufferSize, sfilefd, pwriteReceiverDataArg); writeReceiverData(wbuf,bufferSize, sfilefd, pwriteReceiverDataArg);
}
if (cbAction<2) { if (cbAction<2) {
rawDataReadyCallBack(currframenum, wbuf,sfilefd, guiData,pRawDataReady); rawDataReadyCallBack(currframenum, wbuf,sfilefd, guiData,pRawDataReady);
} else { } else {
fwrite(wbuf, 1, bufferSize, sfilefd); fwrite(wbuf, 1, bufferSize, sfilefd);
} }
} }
if(guiRequiresData){ if(guiRequiresData){
memcpy(latestData,wbuf,bufferSize); if (cbAction>=2)
memcpy(latestData,wbuf,bufferSize);
//memcpy(latestData,wbuf,bufferSize);
guiRequiresData=0; guiRequiresData=0;
} }
//cout<<"write index:"<<(int)(*(int*)latestData)<<endl; //cout<<"write index:"<<(int)(*(int*)latestData)<<endl;