diff --git a/slsDetectorGui/slsDetectorGui.pro b/slsDetectorGui/slsDetectorGui.pro index d0c3ca3f1..16a456639 100644 --- a/slsDetectorGui/slsDetectorGui.pro +++ b/slsDetectorGui/slsDetectorGui.pro @@ -8,8 +8,6 @@ QMAKE_INCDIR_QT = $(QTDIR)/include/ QMAKE_LIBS_QT = -L$(QTDIR)/lib QMAKE_LIBS = -L$(QTDIR)/lib - - DESTDIR ?= bin MOC_DIR = mocs OBJECTS_DIR = objs @@ -22,7 +20,7 @@ CONFIG += debug no_include_pwd QMAKE_CXXFLAGS_WARN_ON = -w QMAKE_CFLAGS_WARN_ON = -w -DEFINES += VERBOSE DACS_INT PRINT_LOG THIS_PATH=\\\"$$PWD\\\" #VERYVERBOSE +DEFINES += EPICS VERBOSE DACS_INT PRINT_LOG THIS_PATH=\\\"$$PWD\\\" #VERYVERBOSE target.path += $(DESTDIR) @@ -36,7 +34,8 @@ QMAKE_CLEAN += docs/*/* #LIBS += -Wl,-Bstatic -L../slsDetectorSoftware -lSlsDetector -Wl,-Bdynamic\ # -L$(QWTDIR)/lib -lqwt -L$(QWT3D)/lib -LIBS = -L$(QWTDIR)/lib -lqwt -L$(QWT3D)/lib +LIBS = -L$(QWTDIR)/lib -lqwt -L$(QWT3D)/lib -Wl,-R$(QWTDIR)/lib -L /usr/local/epics/base/lib/$(EPICS_HOST_ARCH)/ -Wl,-R/usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -lca -lCom + DEPENDPATH += \ slsDetectorPlotting/include\ @@ -51,8 +50,7 @@ INCLUDEPATH = \ slsDetectorPlotting/include\ include\ forms/include\ - $(INCLUDES) - + $(INCLUDES) /usr/local/epics/base/include/ -I /usr/local/epics/base/include/os/Linux/ # $(shell echo "/lib/modules/`uname -r`/build/include") \ # ../slsDetectorSoftware/commonFiles\ # ../slsDetectorSoftware/MySocketTCP\ diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index 272f09b11..fd03df578 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -622,8 +622,16 @@ int qDrawPlot::GetDataCallBack(detectorData *data, int fIndex, void *this_pointe int qDrawPlot::GetData(detectorData *data,int fIndex){ -#ifdef VERYVERBOSE +#ifdef VERBOSE cout << "******Entering GetDatafunction********" << endl; + cout << "fname " << data->fileName << endl; + cout << "npoints " << data->npoints << endl; + cout << "npy " << data->npy << endl; + cout << "npy " << data->progressIndex << endl; + cout << "values " << data->values << endl; + cout << "errors " << data->errors << endl; + cout << "angle " << data->angles << endl; + #endif if(!stop_signal){ diff --git a/slsDetectorGui/src/qTabDataOutput.cpp b/slsDetectorGui/src/qTabDataOutput.cpp index edede74c3..c5821e1ea 100644 --- a/slsDetectorGui/src/qTabDataOutput.cpp +++ b/slsDetectorGui/src/qTabDataOutput.cpp @@ -106,10 +106,22 @@ void qTabDataOutput::SetupWidgetWindow(){ //discard bad channels from server #ifdef VERBOSE cout << "Getting bad channel correction" << endl; + cout << "func " << myDet->getBadChannelCorrection() << endl; #endif - if(myDet->getBadChannelCorrection()) chkDiscardBad->setChecked(true); + int nb=myDet->getBadChannelCorrection(); + disconnect(chkDiscardBad, SIGNAL(toggled(bool))); + + if(nb) chkDiscardBad->setChecked(true); + + + connect(chkDiscardBad, SIGNAL(toggled(bool)), this, SLOT(DiscardBadChannels())); + +#ifdef VERBOSE + cout << "done" << endl; +#endif + qDefs::checkErrorMessage(myDet); } @@ -486,19 +498,19 @@ void qTabDataOutput::SetAngularCorrection(){ void qTabDataOutput::DiscardBadChannels(){ -#ifdef VERYVERBOSE + //#ifdef VERYVERBOSE cout << "Entering Discard bad channels function" << endl; -#endif + //#endif if(chkDiscardBad->isChecked()){ - myDet->setBadChannelCorrection("default"); #ifdef VERBOSE cout << "Setting bad channel correction to default" << endl; #endif + myDet->setBadChannelCorrection("default"); }else{ - myDet->setBadChannelCorrection(""); #ifdef VERBOSE cout << "Unsetting bad channel correction" << endl; #endif + myDet->setBadChannelCorrection(""); } qDefs::checkErrorMessage(myDet); @@ -556,10 +568,16 @@ void qTabDataOutput::Refresh(){ //discard bad channels from server #ifdef VERBOSE cout << "Getting bad channel correction" << endl; + // cout << "ff " << myDet->getBadChannelCorrection() << endl; #endif + + // disconnect(chkDiscardBad, SIGNAL(toggled(bool))); + if(myDet->getBadChannelCorrection()) chkDiscardBad->setChecked(true); + // connect(chkDiscardBad, SIGNAL(toggled(bool)), this, SLOT(DiscardBadChannels())); + if(myDet->setReceiverOnline()==slsDetectorDefs::ONLINE_FLAG){ btnOutputBrowse->setEnabled(false); btnOutputBrowse->setToolTip("This button is disabled as receiver PC is different from "