diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index 6e9a4c848..a121319e2 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -373,6 +373,9 @@ void qDrawPlot::SetupWidgetWindow(){ // callbacks // Setting the callback function to get data from detector class + if (setReceiverOnline() == slsDetectorDefs::ONLINE_FLAG) { + enableDataStreamingFromReceiver(1); + } myDet->registerDataCallback(&(GetDataCallBack),this); // also enables data streaming in client and receiver (if receiver exists) //Setting the callback function to alert when acquisition finished from detector class myDet->registerAcquisitionFinishedCallback(&(GetAcquisitionFinishedCallBack),this); diff --git a/slsDetectorSoftware/slsDetectorAnalysis/postProcessing.h b/slsDetectorSoftware/slsDetectorAnalysis/postProcessing.h index 7903688dd..43fb2f528 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/postProcessing.h +++ b/slsDetectorSoftware/slsDetectorAnalysis/postProcessing.h @@ -239,10 +239,7 @@ s void registerDataCallback(int( *userCallback)(detectorData*, int, int, void*), void *pArg) { \ dataReady = userCallback; \ pCallbackArg = pArg; \ - if (setReceiverOnline() == slsDetectorDefs::ONLINE_FLAG) { \ - enableDataStreamingToClient(1); \ - enableDataStreamingFromReceiver(1);}}; \ - + enableDataStreamingToClient(dataReady == NULL ? 0 : 1);}; \ void registerRawDataCallback(int( *userCallback)(double*, int, void*), void *pArg) {rawDataReady = userCallback; pRawDataArg = pArg;};