mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 06:50:02 +02:00
edited getdatafromdetector to not stop detector for eiger
This commit is contained in:
parent
66db11421f
commit
bc55f9d1e4
Binary file not shown.
@ -622,10 +622,10 @@ int startStateMachine(){
|
|||||||
|
|
||||||
|
|
||||||
int stopStateMachine(){
|
int stopStateMachine(){
|
||||||
printf("Going to stop acquisition\n");
|
cprintf(BG_RED,"Going to stop acquisition\n");
|
||||||
if(Feb_Control_StopAcquisition() & Beb_StopAcquisition())
|
if(Feb_Control_StopAcquisition() & Beb_StopAcquisition())
|
||||||
return OK;
|
return OK;
|
||||||
printf("failed to stop acquisition\n");
|
cprintf(BG_RED,"failed to stop acquisition\n");
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1317,11 +1317,17 @@ int* multiSlsDetector::getDataFromDetector() {
|
|||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "Detector " << id << " does not have data left " << endl;
|
cout << "Detector " << id << " does not have data left " << endl;
|
||||||
#endif
|
#endif
|
||||||
|
if(detectors[id]->getDetectorsType() != EIGER)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
p+=n/sizeof(int);
|
p+=n/sizeof(int);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//eiger returns only null
|
||||||
|
if(getDetectorsType() == EIGER)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (nodatadet>=0) {
|
if (nodatadet>=0) {
|
||||||
for (int id=0; id<thisMultiDetector->numberOfDetectors; id++) {
|
for (int id=0; id<thisMultiDetector->numberOfDetectors; id++) {
|
||||||
if (id!=nodatadet) {
|
if (id!=nodatadet) {
|
||||||
|
@ -3587,9 +3587,9 @@ int* slsDetector::getDataFromDetector(int *retval){
|
|||||||
} else {
|
} else {
|
||||||
n=controlSocket->ReceiveDataOnly(retval,thisDetector->dataBytes);
|
n=controlSocket->ReceiveDataOnly(retval,thisDetector->dataBytes);
|
||||||
|
|
||||||
// #ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout<< "Received "<< n << " data bytes" << std::endl;
|
std::cout<< "Received "<< n << " data bytes" << std::endl;
|
||||||
// #endif
|
#endif
|
||||||
if (n!=thisDetector->dataBytes) {
|
if (n!=thisDetector->dataBytes) {
|
||||||
std::cout<< "wrong data size received: received " << n << " but expected " << thisDetector->dataBytes << std::endl;
|
std::cout<< "wrong data size received: received " << n << " but expected " << thisDetector->dataBytes << std::endl;
|
||||||
thisDetector->stoppedFlag=1;
|
thisDetector->stoppedFlag=1;
|
||||||
@ -5207,8 +5207,10 @@ char* slsDetector::setDetectorIP(string detectorIP){
|
|||||||
|
|
||||||
|
|
||||||
char* slsDetector::setReceiver(string receiverIP){
|
char* slsDetector::setReceiver(string receiverIP){
|
||||||
if(getRunStatus()==RUNNING)
|
if(getRunStatus()==RUNNING){
|
||||||
|
cprintf(RED,"Acquisition already running, Stopping it.\n");
|
||||||
stopAcquisition();
|
stopAcquisition();
|
||||||
|
}
|
||||||
|
|
||||||
strcpy(thisDetector->receiver_hostname,receiverIP.c_str());
|
strcpy(thisDetector->receiver_hostname,receiverIP.c_str());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user