mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 15:20:02 +02:00
bug fix: software trigger using control connect
This commit is contained in:
parent
6f2aad3836
commit
06473cfcb2
@ -3567,14 +3567,16 @@ int slsDetector::sendSoftwareTrigger() {
|
||||
#endif
|
||||
thisDetector->stoppedFlag=0;
|
||||
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||
if (connectControl() == OK){
|
||||
stopSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
stopSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||
if (ret==FAIL) {
|
||||
stopSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||
std::cout<< "Detector returned error: " << mess << std::endl;
|
||||
if (stopSocket) {
|
||||
if (connectStop() == OK){
|
||||
stopSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
stopSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||
if (ret==FAIL) {
|
||||
stopSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||
std::cout<< "Detector returned error: " << mess << std::endl;
|
||||
}
|
||||
disconnectStop();
|
||||
}
|
||||
disconnectControl();
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user