mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +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);
|
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:
|
public slots:
|
||||||
/** To select 1D or 2D plot
|
/** To select 1D or 2D plot
|
||||||
@ -480,6 +489,10 @@ double* pedestalVals;
|
|||||||
/** count for 20 frames to calculate the pedestal */
|
/** count for 20 frames to calculate the pedestal */
|
||||||
int pedestalCount;
|
int pedestalCount;
|
||||||
|
|
||||||
|
/** this is set when client starts/stops acquisition
|
||||||
|
* and is reset once the gui really starts/stops */
|
||||||
|
bool clientInitiated;
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void UpdatingPlotFinished();
|
void UpdatingPlotFinished();
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
/** Project Class Headers */
|
/** Project Class Headers */
|
||||||
class multiSlsDetector;
|
class multiSlsDetector;
|
||||||
/** Qt Project Class Headers */
|
/** Qt Project Class Headers */
|
||||||
class qDrawPlot;
|
#include "qDrawPlot.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*@short sets up the measurement parameters
|
*@short sets up the measurement parameters
|
||||||
@ -55,7 +55,7 @@ public:
|
|||||||
/** Click the Start/Stop Acquisition button
|
/** Click the Start/Stop Acquisition button
|
||||||
* This is used if this command came from gui client
|
* This is used if this command came from gui client
|
||||||
*/
|
*/
|
||||||
void ClickStartStop(){btnStartStop->click();};
|
void ClickStartStop(){btnStartStop->click();myPlot->SetClientInitiated();};
|
||||||
|
|
||||||
/** Returns progress bar value */
|
/** Returns progress bar value */
|
||||||
int GetProgress(){return progressBar->value();};
|
int GetProgress(){return progressBar->value();};
|
||||||
|
@ -724,7 +724,6 @@ int qDetectorMain::StartStopAcquisitionFromClient(bool start){
|
|||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "Start/Stop Acquisition From Client:" << start << endl;
|
cout << "Start/Stop Acquisition From Client:" << start << endl;
|
||||||
#endif
|
#endif
|
||||||
int ret = slsDetectorDefs::FAIL;
|
|
||||||
|
|
||||||
if (tab_measurement->GetStartStatus() != start){
|
if (tab_measurement->GetStartStatus() != start){
|
||||||
if(start){
|
if(start){
|
||||||
@ -735,12 +734,10 @@ int qDetectorMain::StartStopAcquisitionFromClient(bool start){
|
|||||||
}
|
}
|
||||||
//click start/stop
|
//click start/stop
|
||||||
tab_measurement->ClickStartStop();
|
tab_measurement->ClickStartStop();
|
||||||
|
while(myPlot->GetClientInitiated());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (myPlot->isRunning() == start)
|
return slsDetectorDefs::OK;
|
||||||
ret = slsDetectorDefs::OK;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,6 +173,7 @@ void qDrawPlot::SetupWidgetWindow(){
|
|||||||
if(myDet->getDetectorsType()==slsDetectorDefs::GOTTHARD)
|
if(myDet->getDetectorsType()==slsDetectorDefs::GOTTHARD)
|
||||||
pedestalCount = 0;
|
pedestalCount = 0;
|
||||||
|
|
||||||
|
clientInitiated = false;
|
||||||
|
|
||||||
//widget related initialization
|
//widget related initialization
|
||||||
|
|
||||||
@ -349,6 +350,9 @@ void qDrawPlot::StartStopDaqToggle(bool stop_if_running){
|
|||||||
StartDaq(true);
|
StartDaq(true);
|
||||||
running=!running;
|
running=!running;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** if this is set during client initation */
|
||||||
|
clientInitiated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ int qServer::Acquire(){
|
|||||||
|
|
||||||
int ret = myMainTab->StartStopAcquisitionFromClient(true);
|
int ret = myMainTab->StartStopAcquisitionFromClient(true);
|
||||||
|
|
||||||
if(ret == OK)
|
usleep(5000);
|
||||||
while(myMainTab->isPlotRunning());
|
while(myMainTab->isPlotRunning());
|
||||||
|
|
||||||
mySocket->SendDataOnly(&ret,sizeof(ret));
|
mySocket->SendDataOnly(&ret,sizeof(ret));
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
//Qt Project Class Headers
|
//Qt Project Class Headers
|
||||||
#include "qTabMeasurement.h"
|
#include "qTabMeasurement.h"
|
||||||
#include "qDrawPlot.h"
|
|
||||||
//Project Class Headers
|
//Project Class Headers
|
||||||
#include "slsDetector.h"
|
#include "slsDetector.h"
|
||||||
#include "multiSlsDetector.h"
|
#include "multiSlsDetector.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user