unregistering call back, detangling receiver streaming from callback

This commit is contained in:
maliakal_d 2020-01-06 11:50:08 +01:00
parent 54bedeaa0a
commit 75838f77b3
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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;};