mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-19 18:40:01 +02:00
there was a gap between start and get status
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@154 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
parent
448f333b1e
commit
ab41ffb6bf
@ -116,6 +116,15 @@ public:
|
||||
* */
|
||||
int UpdateTrimbitPlot(bool fromDetector,bool Histogram);
|
||||
|
||||
/** This is set once client initiates start/stop acquisition
|
||||
* and this is reset when the gui really starts/stops- to know when to return
|
||||
*/
|
||||
void SetClientInitiated(){clientInitiated = true;};
|
||||
|
||||
/** Get client intiated variable. This is set once client initiates start/stop acquisition
|
||||
* and this is reset when the gui really starts/stops- to know when to return
|
||||
*/
|
||||
bool GetClientInitiated(){return clientInitiated;};
|
||||
|
||||
public slots:
|
||||
/** To select 1D or 2D plot
|
||||
@ -480,6 +489,10 @@ double* pedestalVals;
|
||||
/** count for 20 frames to calculate the pedestal */
|
||||
int pedestalCount;
|
||||
|
||||
/** this is set when client starts/stops acquisition
|
||||
* and is reset once the gui really starts/stops */
|
||||
bool clientInitiated;
|
||||
|
||||
|
||||
signals:
|
||||
void UpdatingPlotFinished();
|
||||
|
@ -15,7 +15,7 @@
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
/** Qt Project Class Headers */
|
||||
class qDrawPlot;
|
||||
#include "qDrawPlot.h"
|
||||
|
||||
/**
|
||||
*@short sets up the measurement parameters
|
||||
@ -55,7 +55,7 @@ public:
|
||||
/** Click the Start/Stop Acquisition button
|
||||
* This is used if this command came from gui client
|
||||
*/
|
||||
void ClickStartStop(){btnStartStop->click();};
|
||||
void ClickStartStop(){btnStartStop->click();myPlot->SetClientInitiated();};
|
||||
|
||||
/** Returns progress bar value */
|
||||
int GetProgress(){return progressBar->value();};
|
||||
|
@ -724,7 +724,6 @@ int qDetectorMain::StartStopAcquisitionFromClient(bool start){
|
||||
#ifdef VERBOSE
|
||||
cout << "Start/Stop Acquisition From Client:" << start << endl;
|
||||
#endif
|
||||
int ret = slsDetectorDefs::FAIL;
|
||||
|
||||
if (tab_measurement->GetStartStatus() != start){
|
||||
if(start){
|
||||
@ -735,12 +734,10 @@ int qDetectorMain::StartStopAcquisitionFromClient(bool start){
|
||||
}
|
||||
//click start/stop
|
||||
tab_measurement->ClickStartStop();
|
||||
while(myPlot->GetClientInitiated());
|
||||
}
|
||||
|
||||
if (myPlot->isRunning() == start)
|
||||
ret = slsDetectorDefs::OK;
|
||||
|
||||
return ret;
|
||||
return slsDetectorDefs::OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -173,6 +173,7 @@ void qDrawPlot::SetupWidgetWindow(){
|
||||
if(myDet->getDetectorsType()==slsDetectorDefs::GOTTHARD)
|
||||
pedestalCount = 0;
|
||||
|
||||
clientInitiated = false;
|
||||
|
||||
//widget related initialization
|
||||
|
||||
@ -349,6 +350,9 @@ void qDrawPlot::StartStopDaqToggle(bool stop_if_running){
|
||||
StartDaq(true);
|
||||
running=!running;
|
||||
}
|
||||
|
||||
/** if this is set during client initation */
|
||||
clientInitiated = false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -304,8 +304,8 @@ int qServer::Acquire(){
|
||||
|
||||
int ret = myMainTab->StartStopAcquisitionFromClient(true);
|
||||
|
||||
if(ret == OK)
|
||||
while(myMainTab->isPlotRunning());
|
||||
usleep(5000);
|
||||
while(myMainTab->isPlotRunning());
|
||||
|
||||
mySocket->SendDataOnly(&ret,sizeof(ret));
|
||||
if(ret==FAIL)
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
//Qt Project Class Headers
|
||||
#include "qTabMeasurement.h"
|
||||
#include "qDrawPlot.h"
|
||||
//Project Class Headers
|
||||
#include "slsDetector.h"
|
||||
#include "multiSlsDetector.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user