gotthard works with receiver without tcp lock

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@109 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d 2012-11-12 15:47:55 +00:00
parent ba923b55b7
commit 854015532e
3 changed files with 8 additions and 24 deletions

View File

@ -646,6 +646,7 @@ void qDetectorMain::EnableTabs(){
actionLoadCalibration->setVisible(expertTab); actionLoadCalibration->setVisible(expertTab);
actionSaveCalibration->setVisible(expertTab); actionSaveCalibration->setVisible(expertTab);
//moved to here, so that its all in order, instead of signals and different threads //moved to here, so that its all in order, instead of signals and different threads
if(!enable) { if(!enable) {
//set the plot type first(acccss shared memory) //set the plot type first(acccss shared memory)

View File

@ -221,9 +221,9 @@ void qDrawPlot::Initialization(){
void qDrawPlot::StartStopDaqToggle(bool stop_if_running){ void qDrawPlot::StartStopDaqToggle(bool stop_if_running){
#ifdef VERYVERBOSE //#ifdef VERYVERBOSE
cout << "Entering StartStopDaqToggle(" << stop_if_running << ")" <<endl; cout << "Entering StartStopDaqToggle(" << stop_if_running << ")" <<endl;
#endif //#endif
//static bool running = 1; //static bool running = 1;
if(running){ //stopping if(running){ //stopping
StartDaq(false); StartDaq(false);
@ -512,20 +512,8 @@ void qDrawPlot::SetupMeasurement(int currentIndex){
void* qDrawPlot::DataStartAcquireThread(void *this_pointer){ void* qDrawPlot::DataStartAcquireThread(void *this_pointer){
bool receiver=(((qDrawPlot*)this_pointer)->myDet->setReceiverOnline()==slsDetectorDefs::ONLINE_FLAG);
if(receiver){
if(((qDrawPlot*)this_pointer)->myDet->startReceiver()==slsDetectorDefs::OK)
usleep(2000000);
else{
qDefs::Message(qDefs::CRITICAL,"could not start receiver","Plot");
return this_pointer;
}
}
((qDrawPlot*)this_pointer)->myDet->acquire(1); ((qDrawPlot*)this_pointer)->myDet->acquire(1);
if(receiver){
usleep(0);
((qDrawPlot*)this_pointer)->myDet->stopReceiver();
}
return this_pointer; return this_pointer;
} }
@ -791,9 +779,9 @@ int qDrawPlot::GetAcquisitionFinishedCallBack(double currentProgress,int detecto
int qDrawPlot::AcquisitionFinished(double currentProgress, int detectorStatus){ 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
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;
@ -857,9 +845,9 @@ int qDrawPlot::GetMeasurementFinishedCallBack(int currentMeasurementIndex, int f
int qDrawPlot::MeasurementFinished(int currentMeasurementIndex, int fileIndex){ int qDrawPlot::MeasurementFinished(int currentMeasurementIndex, int fileIndex){
#ifdef VERBOSE //#ifdef VERBOSE
cout << "Entering Measurement Finished with currentMeasurement " << currentMeasurementIndex << " and fileIndex " << fileIndex << endl; cout << "Entering Measurement Finished with currentMeasurement " << currentMeasurementIndex << " and fileIndex " << fileIndex << endl;
#endif //#endif
//to make sure it plots the last frame before setting lastimagearray all to 0 //to make sure it plots the last frame before setting lastimagearray all to 0
//if(plot_in_scope==2) //if(plot_in_scope==2)
usleep(500000); usleep(500000);

View File

@ -318,11 +318,6 @@ void qTabMeasurement::startStopAcquisition(){
btnStartStop->setIcon(*iconStart); btnStartStop->setIcon(*iconStart);
btnStartStop->setChecked(false); btnStartStop->setChecked(false);
Enable(1); Enable(1);
if(myDet->setReceiverOnline()==slsDetectorDefs::ONLINE_FLAG){
usleep(0);
myDet->stopReceiver();
}
} }
} }