edited getdatafromdetector to not stop detector for eiger

This commit is contained in:
Dhanya Maliakal 2015-11-17 12:00:42 +01:00
parent 66db11421f
commit bc55f9d1e4
4 changed files with 105 additions and 97 deletions

View File

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

View File

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

View File

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