fixed gui starting up without the config file

This commit is contained in:
Dhanya Maliakal
2017-06-22 15:26:00 +02:00
parent cffdf7fede
commit 931e750d65
2 changed files with 7 additions and 1 deletions

View File

@ -295,6 +295,11 @@ void qDetectorMain::SetUpDetector(const string fName){
cout << endl << "Type : " << slsDetectorBase::getDetectorType(detType) << "\nDetector : " << host << endl; cout << endl << "Type : " << slsDetectorBase::getDetectorType(detType) << "\nDetector : " << host << endl;
//#endif //#endif
myDet->setOnline(slsDetectorDefs::ONLINE_FLAG); myDet->setOnline(slsDetectorDefs::ONLINE_FLAG);
if(detType != slsDetectorDefs::MYTHEN) {
if(myDet->setReceiverOnline(slsDetectorDefs::GET_ONLINE_FLAG) == slsDetectorDefs::ONLINE_FLAG) {cprintf(GREEN,"is online!\n");
myDet->setReceiverOnline(slsDetectorDefs::ONLINE_FLAG);
}else cprintf(RED,"is not online!\n");
}
qDefs::checkErrorMessage(myDet,"qDetectorMain::SetUpDetector"); qDefs::checkErrorMessage(myDet,"qDetectorMain::SetUpDetector");
} }

View File

@ -333,8 +333,9 @@ void qDrawPlot::SetupWidgetWindow(){
//Setting the callback function to get progress from detector class(using receivers) //Setting the callback function to get progress from detector class(using receivers)
myDet->registerProgressCallback(&(GetProgressCallBack),this); myDet->registerProgressCallback(&(GetProgressCallBack),this);
//stream data from receiver to the gui //stream data from receiver to the gui
if(detType != slsDetectorDefs::MYTHEN) if(detType != slsDetectorDefs::MYTHEN && myDet->setReceiverOnline(slsDetectorDefs::GET_ONLINE_FLAG) == slsDetectorDefs::ONLINE_FLAG) {
myDet->enableDataStreamingFromReceiver(1); myDet->enableDataStreamingFromReceiver(1);
}
qDefs::checkErrorMessage(myDet,"qDrawPlot::SetupWidgetWindow"); qDefs::checkErrorMessage(myDet,"qDrawPlot::SetupWidgetWindow");