From 8a8ee59474eb32a2424632f87ffcb36b7064cbac Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Fri, 14 Mar 2014 10:08:52 +0000 Subject: [PATCH] fixed bug in settings frmes for eiger and not for gotthard git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@775 951219d9-93cf-4727-9268-0efd64621fa3 --- .../slsDetector/slsDetector.cpp | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 4142105f7..d6b4d2188 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -3534,10 +3534,22 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){ - if((ret != FAIL) && (t != -1)){ - //send acquisiton period to receiver - if((setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG) && ((index==FRAME_PERIOD)||(index==FRAME_NUMBER)) && (ret != FAIL) && (t != -1)){ + //send acquisiton period/frame number to receiver + switch(thisDetector->myDetectorType){ + case EIGER: + if(index != FRAME_NUMBER) + return thisDetector->timerValue[index]; + break; + //for gotthard and moench, mythen returns anyway because of no rxr + default: + if(index != FRAME_PERIOD) + return thisDetector->timerValue[index]; + break; + } + + if((ret != FAIL) && (t != -1)){ + if(setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG){ int64_t args[2]; args[1] = retval; if(index==FRAME_NUMBER) @@ -3571,6 +3583,7 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){ if(ret==FORCE_UPDATE) updateReceiver(); } + } return thisDetector->timerValue[index]; @@ -4848,7 +4861,7 @@ char* slsDetector::setReceiver(string receiverIP){ strcpy(thisDetector->receiver_hostname,receiverIP.c_str()); if(setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG){ -#ifdef VERBOSE +//#ifdef VERBOSE std::cout << "Setting up receiver with" << endl << "file path:" << fileIO::getFilePath() << endl << "file name:" << fileIO::getFileName() << endl << @@ -4859,7 +4872,7 @@ char* slsDetector::setReceiver(string receiverIP){ "frame period:" << setTimer(FRAME_PERIOD,-1) << endl; } std::cout << endl; -#endif +//#endif if(thisDetector->myDetectorType == EIGER) setDetectorHostname(); setFilePath(fileIO::getFilePath());