mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 21:37:13 +02:00
bug fix: enabledatastreaming get should return shared memory variable and not from receiver, bug fix:zmq buffering when acquire form command line, stopping sockets when command line acquire or receiver start, restarting sockets at change of port numbers and a refresh button for the same
This commit is contained in:
@ -2316,6 +2316,15 @@ string slsDetectorCommand::cmdAcquire(int narg, char *args[], int action) {
|
||||
myDet->setOnline(ONLINE_FLAG);
|
||||
int r_online = myDet->setReceiverOnline(ONLINE_FLAG);
|
||||
|
||||
// switch off data streaming to prevent extra images in zmq gui buffer
|
||||
if (r_online == ONLINE_FLAG) {
|
||||
if (myDet->enableDataStreamingFromReceiver() != 0) {
|
||||
if (myDet->enableDataStreamingFromReceiver(0) != 0) {
|
||||
std::cout << "Error: Unable to switch off data streaming in receiver. If GUI on, extra image(s) in zmq GUI buffer" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(myDet->acquire() == FAIL)
|
||||
return string("acquire unsuccessful");
|
||||
if(r_online){
|
||||
@ -5882,10 +5891,18 @@ string slsDetectorCommand::cmdReceiver(int narg, char *args[], int action) {
|
||||
|
||||
|
||||
myDet->setOnline(ONLINE_FLAG);
|
||||
myDet->setReceiverOnline(ONLINE_FLAG);
|
||||
int r_online = myDet->setReceiverOnline(ONLINE_FLAG);
|
||||
|
||||
if(cmd=="receiver"){
|
||||
if (action==PUT_ACTION) {
|
||||
// switch off data streaming to prevent extra images in zmq gui buffer
|
||||
if (r_online == ONLINE_FLAG) {
|
||||
if (myDet->enableDataStreamingFromReceiver() != 0) {
|
||||
if (myDet->enableDataStreamingFromReceiver(0) != 0) {
|
||||
std::cout << "Error: Unable to switch off data streaming in receiver. If GUI on, extra image(s) in zmq GUI buffer" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!strcasecmp(args[1],"start"))
|
||||
myDet->startReceiver();
|
||||
else if(!strcasecmp(args[1],"stop"))
|
||||
|
Reference in New Issue
Block a user