From 931e750d652bbe696a5118050db7995309163dad Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Thu, 22 Jun 2017 15:26:00 +0200 Subject: [PATCH] fixed gui starting up without the config file --- slsDetectorGui/src/qDetectorMain.cpp | 5 +++++ slsDetectorGui/src/qDrawPlot.cpp | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/slsDetectorGui/src/qDetectorMain.cpp b/slsDetectorGui/src/qDetectorMain.cpp index 3123f457f..369f1e473 100644 --- a/slsDetectorGui/src/qDetectorMain.cpp +++ b/slsDetectorGui/src/qDetectorMain.cpp @@ -295,6 +295,11 @@ void qDetectorMain::SetUpDetector(const string fName){ cout << endl << "Type : " << slsDetectorBase::getDetectorType(detType) << "\nDetector : " << host << endl; //#endif 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"); } diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index bffc2d123..624073cbb 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -333,8 +333,9 @@ void qDrawPlot::SetupWidgetWindow(){ //Setting the callback function to get progress from detector class(using receivers) myDet->registerProgressCallback(&(GetProgressCallBack),this); //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); + } qDefs::checkErrorMessage(myDet,"qDrawPlot::SetupWidgetWindow");