mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-04 09:00:41 +02:00
wait state between acquistion finished and ready for next acquire in gui, check if acquiringflag is set then reset it
This commit is contained in:
parent
d5c310a2db
commit
baee38802b
@ -585,6 +585,7 @@ void SetCurrentMeasurementSignal(int);
|
||||
void saveErrorSignal(QString);
|
||||
void AcquisitionErrorSignal(QString);
|
||||
void UpdatePlotSignal();
|
||||
void AcquisitionFinishedSignal();
|
||||
};
|
||||
|
||||
|
||||
|
@ -65,6 +65,10 @@ public:
|
||||
|
||||
public slots:
|
||||
|
||||
/** Unconnects start/stop button when acquisition is finished
|
||||
*/
|
||||
void AcquisitionFinished();
|
||||
|
||||
/** update plot is finished,
|
||||
* changes start/stop text and enables/disables all widgets
|
||||
*/
|
||||
|
@ -329,6 +329,7 @@ void qDetectorMain::Initialization(){
|
||||
// Plotting
|
||||
// When the acquisition is finished, must update the meas tab
|
||||
connect(myPlot, SIGNAL(UpdatingPlotFinished()), this, SLOT(EnableTabs()));
|
||||
connect(myPlot, SIGNAL(AcquisitionFinishedSignal()), tab_measurement, SLOT(AcquisitionFinished()));
|
||||
connect(myPlot, SIGNAL(UpdatingPlotFinished()), tab_measurement, SLOT(UpdateFinished()));
|
||||
//This should not be called as it will change file name to measurement when run finished
|
||||
//connect(myPlot, SIGNAL(UpdatingPlotFinished()), tab_plot, SLOT(Refresh()));
|
||||
|
@ -743,7 +743,11 @@ void* qDrawPlot::DataStartAcquireThread(void *this_pointer){
|
||||
}
|
||||
}
|
||||
|
||||
if (((qDrawPlot*)this_pointer)->myDet->getAcquiringFlag() == true) {
|
||||
((qDrawPlot*)this_pointer)->myDet->setAcquiringFlag(false);
|
||||
}
|
||||
((qDrawPlot*)this_pointer)->myDet->acquire(1);
|
||||
|
||||
return this_pointer;
|
||||
}
|
||||
|
||||
@ -1208,6 +1212,7 @@ int qDrawPlot::AcquisitionFinished(double currentProgress, int detectorStatus){
|
||||
#ifdef VERBOSE
|
||||
cout << "\nEntering Acquisition Finished with status " ;
|
||||
#endif
|
||||
emit AcquisitionFinishedSignal();
|
||||
QString status = QString(slsDetectorBase::runStatusType(slsDetectorDefs::runStatus(detectorStatus)).c_str());
|
||||
#ifdef VERBOSE
|
||||
cout << status.toAscii().constData() << " and progress " << currentProgress << endl;
|
||||
@ -1220,14 +1225,12 @@ int qDrawPlot::AcquisitionFinished(double currentProgress, int detectorStatus){
|
||||
//stop_signal = 1;//just to be sure
|
||||
emit AcquisitionErrorSignal(status);
|
||||
}
|
||||
|
||||
#ifdef VERBOSE
|
||||
//all measurements are over
|
||||
else if(currentProgress==100){
|
||||
#ifdef VERBOSE
|
||||
cout << "Acquisition Finished" << endl << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
StartStopDaqToggle(true);
|
||||
//this lets the measurement tab know its over, and to enable tabs
|
||||
emit UpdatingPlotFinished();
|
||||
|
@ -374,6 +374,15 @@ void qTabMeasurement::startStopAcquisition(){
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::AcquisitionFinished(){
|
||||
disconnect(btnStartStop,SIGNAL(clicked()),this,SLOT(startStopAcquisition()));
|
||||
btnStartStop->setText("Wait");
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::UpdateFinished(){
|
||||
UpdateProgress();
|
||||
disconnect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
|
||||
@ -381,7 +390,7 @@ void qTabMeasurement::UpdateFinished(){
|
||||
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
|
||||
progressTimer->stop();
|
||||
|
||||
disconnect(btnStartStop,SIGNAL(clicked()),this,SLOT(startStopAcquisition()));
|
||||
/*disconnect(btnStartStop,SIGNAL(clicked()),this,SLOT(startStopAcquisition())); done in AcquisitionFinished() already */
|
||||
btnStartStop->setText("Start");
|
||||
btnStartStop->setIcon(*iconStart);
|
||||
btnStartStop->setChecked(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user