mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 01:50:40 +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 saveErrorSignal(QString);
|
||||||
void AcquisitionErrorSignal(QString);
|
void AcquisitionErrorSignal(QString);
|
||||||
void UpdatePlotSignal();
|
void UpdatePlotSignal();
|
||||||
|
void AcquisitionFinishedSignal();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,6 +65,10 @@ public:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
|
/** Unconnects start/stop button when acquisition is finished
|
||||||
|
*/
|
||||||
|
void AcquisitionFinished();
|
||||||
|
|
||||||
/** update plot is finished,
|
/** update plot is finished,
|
||||||
* changes start/stop text and enables/disables all widgets
|
* changes start/stop text and enables/disables all widgets
|
||||||
*/
|
*/
|
||||||
|
@ -329,6 +329,7 @@ void qDetectorMain::Initialization(){
|
|||||||
// Plotting
|
// Plotting
|
||||||
// When the acquisition is finished, must update the meas tab
|
// When the acquisition is finished, must update the meas tab
|
||||||
connect(myPlot, SIGNAL(UpdatingPlotFinished()), this, SLOT(EnableTabs()));
|
connect(myPlot, SIGNAL(UpdatingPlotFinished()), this, SLOT(EnableTabs()));
|
||||||
|
connect(myPlot, SIGNAL(AcquisitionFinishedSignal()), tab_measurement, SLOT(AcquisitionFinished()));
|
||||||
connect(myPlot, SIGNAL(UpdatingPlotFinished()), tab_measurement, SLOT(UpdateFinished()));
|
connect(myPlot, SIGNAL(UpdatingPlotFinished()), tab_measurement, SLOT(UpdateFinished()));
|
||||||
//This should not be called as it will change file name to measurement when run finished
|
//This should not be called as it will change file name to measurement when run finished
|
||||||
//connect(myPlot, SIGNAL(UpdatingPlotFinished()), tab_plot, SLOT(Refresh()));
|
//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);
|
((qDrawPlot*)this_pointer)->myDet->acquire(1);
|
||||||
|
|
||||||
return this_pointer;
|
return this_pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1208,6 +1212,7 @@ int qDrawPlot::AcquisitionFinished(double currentProgress, int detectorStatus){
|
|||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "\nEntering Acquisition Finished with status " ;
|
cout << "\nEntering Acquisition Finished with status " ;
|
||||||
#endif
|
#endif
|
||||||
|
emit AcquisitionFinishedSignal();
|
||||||
QString status = QString(slsDetectorBase::runStatusType(slsDetectorDefs::runStatus(detectorStatus)).c_str());
|
QString status = QString(slsDetectorBase::runStatusType(slsDetectorDefs::runStatus(detectorStatus)).c_str());
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << status.toAscii().constData() << " and progress " << currentProgress << endl;
|
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
|
//stop_signal = 1;//just to be sure
|
||||||
emit AcquisitionErrorSignal(status);
|
emit AcquisitionErrorSignal(status);
|
||||||
}
|
}
|
||||||
|
#ifdef VERBOSE
|
||||||
//all measurements are over
|
//all measurements are over
|
||||||
else if(currentProgress==100){
|
else if(currentProgress==100){
|
||||||
#ifdef VERBOSE
|
|
||||||
cout << "Acquisition Finished" << endl << endl;
|
cout << "Acquisition Finished" << endl << endl;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
StartStopDaqToggle(true);
|
StartStopDaqToggle(true);
|
||||||
//this lets the measurement tab know its over, and to enable tabs
|
//this lets the measurement tab know its over, and to enable tabs
|
||||||
emit UpdatingPlotFinished();
|
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(){
|
void qTabMeasurement::UpdateFinished(){
|
||||||
UpdateProgress();
|
UpdateProgress();
|
||||||
disconnect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
|
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)));
|
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
|
||||||
progressTimer->stop();
|
progressTimer->stop();
|
||||||
|
|
||||||
disconnect(btnStartStop,SIGNAL(clicked()),this,SLOT(startStopAcquisition()));
|
/*disconnect(btnStartStop,SIGNAL(clicked()),this,SLOT(startStopAcquisition())); done in AcquisitionFinished() already */
|
||||||
btnStartStop->setText("Start");
|
btnStartStop->setText("Start");
|
||||||
btnStartStop->setIcon(*iconStart);
|
btnStartStop->setIcon(*iconStart);
|
||||||
btnStartStop->setChecked(false);
|
btnStartStop->setChecked(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user