diff --git a/slsDetectorSoftware/gotthardDetectorServer/svnInfoGotthard.h b/slsDetectorSoftware/gotthardDetectorServer/svnInfoGotthard.h index b0d8b689c..ef85794b6 100644 --- a/slsDetectorSoftware/gotthardDetectorServer/svnInfoGotthard.h +++ b/slsDetectorSoftware/gotthardDetectorServer/svnInfoGotthard.h @@ -2,10 +2,10 @@ #define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/gotthardDetectorServer" //#define SVNREPPATH "" #define SVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3" -//#define SVNREV 0x577 +//#define SVNREV 0x578 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTH "l_maliakal_d" -#define SVNREV 0x577 +#define SVNREV 0x578 #define SVNDATE 0x20130527 // diff --git a/slsDetectorSoftware/moenchDetectorServer/svnInfoMoench.h b/slsDetectorSoftware/moenchDetectorServer/svnInfoMoench.h index 55bead9dc..dfb0dca56 100644 --- a/slsDetectorSoftware/moenchDetectorServer/svnInfoMoench.h +++ b/slsDetectorSoftware/moenchDetectorServer/svnInfoMoench.h @@ -2,10 +2,10 @@ #define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/moenchDetectorServer" //#define SVNREPPATH "" #define SVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3" -//#define SVNREV 0x577 +//#define SVNREV 0x578 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTH "l_maliakal_d" -#define SVNREV 0x577 +#define SVNREV 0x578 #define SVNDATE 0x20130527 // diff --git a/slsDetectorSoftware/mythenDetectorServer/svnInfoMythen.h b/slsDetectorSoftware/mythenDetectorServer/svnInfoMythen.h index 3bcaf7852..6ee77f5ae 100644 --- a/slsDetectorSoftware/mythenDetectorServer/svnInfoMythen.h +++ b/slsDetectorSoftware/mythenDetectorServer/svnInfoMythen.h @@ -2,10 +2,10 @@ #define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/mythenDetectorServer" //#define SVNREPPATH "" #define SVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3" -//#define SVNREV 0x577 +//#define SVNREV 0x578 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTH "l_maliakal_d" -#define SVNREV 0x577 +#define SVNREV 0x578 #define SVNDATE 0x20130527 // diff --git a/slsDetectorSoftware/slsDetector/svnInfoLib.h b/slsDetectorSoftware/slsDetector/svnInfoLib.h index cf0dd0673..b346316b9 100644 --- a/slsDetectorSoftware/slsDetector/svnInfoLib.h +++ b/slsDetectorSoftware/slsDetector/svnInfoLib.h @@ -2,10 +2,10 @@ #define SVNURLLIB "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware" //#define SVNREPPATH "" #define SVNREPUUIDLIB "951219d9-93cf-4727-9268-0efd64621fa3" -//#define SVNREV 0x577 +//#define SVNREV 0x578 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTHLIB "l_maliakal_d" -#define SVNREVLIB 0x577 +#define SVNREVLIB 0x578 #define SVNDATELIB 0x20130527 // diff --git a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp index 95b8b3341..42f3a221e 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp +++ b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp @@ -413,6 +413,7 @@ int slsReceiverFunctionList::startWriting(){ char *wbuf; int sleepnumber=0; + int frameFactor=0; framesInFile=0; framesCaught=0; @@ -520,27 +521,31 @@ int slsReceiverFunctionList::startWriting(){ //reads every nth frame else{ + if(frameFactor){ + frameFactor--; + }else{ + frameFactor = nFrameToGui-1; + //catch nth frame: gui ready to copy data + while(guiData==NULL){ + if(!listening_thread_running) + break; + usleep(10000); + guiDataReady=0; + } - //catch nth frame: gui ready to copy data - while(guiData==NULL){ - if(!listening_thread_running) - break; - usleep(10000); + //copies gui data and sets/resets guiDataReady + memcpy(latestData,wbuf,bufferSize); + strcpy(guiFileName,savefilename); + guiDataReady=1; + + //catch nth frame: wait for gui to take data + while(guiData==latestData){ + if(!listening_thread_running) + break; + usleep(100000); + } guiDataReady=0; } - - //copies gui data and sets/resets guiDataReady - memcpy(latestData,wbuf,bufferSize); - strcpy(guiFileName,savefilename); - guiDataReady=1; - - //catch nth frame: wait for gui to take data - while(guiData==latestData){ - if(!listening_thread_running) - break; - usleep(100000); - } - guiDataReady=0; } diff --git a/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.cpp b/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.cpp index b7d155848..71be32f65 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.cpp +++ b/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.cpp @@ -1251,6 +1251,10 @@ int slsReceiverFuncs::set_read_frequency(){ sprintf(mess,"Receiver locked by %s\n", socket->lastClientIP); ret=FAIL; } + else if((slsReceiverList->getStatus()==RUNNING) && (index >= 0)){ + ret = FAIL; + strcpy(mess,"cannot set up receiver mode when receiver is running\n"); + } else retval=slsReceiverList->setNFrameToGui(index); } diff --git a/slsDetectorSoftware/slsReceiver/svnInfoReceiver.h b/slsDetectorSoftware/slsReceiver/svnInfoReceiver.h index 3c474cb9e..5d99ef627 100644 --- a/slsDetectorSoftware/slsReceiver/svnInfoReceiver.h +++ b/slsDetectorSoftware/slsReceiver/svnInfoReceiver.h @@ -2,10 +2,10 @@ #define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/slsReceiver" //#define SVNREPPATH "" #define SVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3" -//#define SVNREV 0x577 +//#define SVNREV 0x578 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTH "l_maliakal_d" -#define SVNREV 0x577 +#define SVNREV 0x578 #define SVNDATE 0x20130527 //