software trigger via stop server instead of control server for sls_detector_acquire

This commit is contained in:
maliakal_d 2020-01-06 11:31:05 +01:00
parent b33b2edbd0
commit 54bedeaa0a

View File

@ -3696,15 +3696,13 @@ int slsDetector::sendSoftwareTrigger() {
thisDetector->stoppedFlag=0; thisDetector->stoppedFlag=0;
if (thisDetector->onlineFlag==ONLINE_FLAG) { if (thisDetector->onlineFlag==ONLINE_FLAG) {
if (connectControl() == OK){ if (connectControl() == OK){
controlSocket->SendDataOnly(&fnum,sizeof(fnum)); stopSocket->SendDataOnly(&fnum,sizeof(fnum));
controlSocket->ReceiveDataOnly(&ret,sizeof(ret)); stopSocket->ReceiveDataOnly(&ret,sizeof(ret));
if (ret==FAIL) { if (ret==FAIL) {
controlSocket->ReceiveDataOnly(mess,sizeof(mess)); stopSocket->ReceiveDataOnly(mess,sizeof(mess));
std::cout<< "Detector returned error: " << mess << std::endl; std::cout<< "Detector returned error: " << mess << std::endl;
} }
disconnectControl(); disconnectControl();
if (ret==FORCE_UPDATE)
updateDetector();
} }
} }
return ret; return ret;