diff --git a/slsDetectorGui/src/qDetectorMain.cpp b/slsDetectorGui/src/qDetectorMain.cpp index de0b09418..c5c46d896 100644 --- a/slsDetectorGui/src/qDetectorMain.cpp +++ b/slsDetectorGui/src/qDetectorMain.cpp @@ -305,11 +305,8 @@ void qDetectorMain::SetUpDetector(const string fName){ cout << endl << "Type : " << slsDetectorBase::getDetectorType(detType) << "\nDetector : " << host << endl; //#endif myDet->setOnline(slsDetectorDefs::ONLINE_FLAG); - if(detType != slsDetectorDefs::MYTHEN) { - if(myDet->setReceiverOnline(slsDetectorDefs::GET_ONLINE_FLAG) == slsDetectorDefs::ONLINE_FLAG) { - myDet->setReceiverOnline(slsDetectorDefs::ONLINE_FLAG); - }else cprintf(RED,"is not online!\n"); - } + if(detType != slsDetectorDefs::MYTHEN) + myDet->setReceiverOnline(slsDetectorDefs::ONLINE_FLAG); qDefs::checkErrorMessage(myDet,"qDetectorMain::SetUpDetector"); } diff --git a/slsDetectorGui/src/qTabDataOutput.cpp b/slsDetectorGui/src/qTabDataOutput.cpp index f8969d938..6b712cc30 100644 --- a/slsDetectorGui/src/qTabDataOutput.cpp +++ b/slsDetectorGui/src/qTabDataOutput.cpp @@ -535,8 +535,10 @@ void qTabDataOutput::GetOutputDir(){ dispOutputDir->setText(QString(myDet->getFilePath().c_str())); //multi file path blank means sls file paths are different if (dispOutputDir->text().isEmpty()) { +#ifdef VERYVERBOSE qDefs::Message(qDefs::INFORMATION,"The file path for individual units are different.\n" "Hence, leaving the common field blank.","qTabDataOutput::GetOutputDir"); +#endif #ifdef VERBOSE cout << "The file path for individual units are different.\n" "Hence, leaving the common field blank." << endl; diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index d065f16c6..082e59afb 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -5952,7 +5952,8 @@ int multiSlsDetector::getData(const int isocket, const bool masking, int* image, if(masking){ unsigned int snel = size/sizeof(int); for(unsigned int i=0;inumberOfDetectors; int numSocketsPerSLSDetector = 1; bool jungfrau = false; + bool eiger = false; switch(getDetectorsType()){ case EIGER: + eiger = true; numSocketsPerSLSDetector = 2; numSockets *= numSocketsPerSLSDetector; maxX = thisMultiDetector->numberOfChannel[X]; @@ -5979,6 +5982,8 @@ void multiSlsDetector::readFrameFromReceiver(){ break; case JUNGFRAU: jungfrau = true; + maxX = thisMultiDetector->numberOfChannel[X]; + maxY = thisMultiDetector->numberOfChannel[Y]; break; default: break; @@ -6007,7 +6012,7 @@ void multiSlsDetector::readFrameFromReceiver(){ //calculating offsets (for eiger interleaving ports) int offsetX[numSockets]; int offsetY[numSockets]; int bottom[numSockets]; - if(maxX){ + if(eiger){ for(int i=0; ioffsetY[i/numSocketsPerSLSDetector] + slsmaxY)) * maxX * bytesperchannel; //the left half or right half @@ -6070,7 +6075,7 @@ void multiSlsDetector::readFrameFromReceiver(){ } //assemble data with interleaving - if(maxX){ + if(eiger){ //bottom if(bottom[isocket]){ @@ -6093,7 +6098,11 @@ void multiSlsDetector::readFrameFromReceiver(){ //assemble data with no interleaving, assumed detectors appended vertically else{ - memcpy((char*)multiframe+slsdatabytes*isocket,(char*)image,slsdatabytes); + for(int i=0;ioffsetY[isocket] + i) * maxX) + thisMultiDetector->offsetX[isocket])* (int)bytesperchannel, + (char*)image+ (i*slsmaxX*(int)bytesperchannel), + (slsmaxX*(int)bytesperchannel)); + } } } diff --git a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp index a6b3a5397..d2b044258 100644 --- a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp +++ b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp @@ -630,17 +630,18 @@ int slsReceiverTCPIPInterface::send_update() { char defaultVal[MAX_STR_LENGTH]; memset(defaultVal, 0, sizeof(defaultVal)); char* path = NULL; + int n = 0; - mySock->SendDataOnly(mySock->lastClientIP,sizeof(mySock->lastClientIP)); + n += mySock->SendDataOnly(mySock->lastClientIP,sizeof(mySock->lastClientIP)); // filepath #ifdef SLS_RECEIVER_UDP_FUNCTIONS path = receiverBase->getFilePath(); #endif if (path == NULL) - mySock->SendDataOnly(defaultVal,MAX_STR_LENGTH); + n += mySock->SendDataOnly(defaultVal,MAX_STR_LENGTH); else { - mySock->SendDataOnly(path,MAX_STR_LENGTH); + n += mySock->SendDataOnly(path,MAX_STR_LENGTH); delete[] path; } @@ -649,9 +650,9 @@ int slsReceiverTCPIPInterface::send_update() { path = receiverBase->getFileName(); #endif if(path == NULL) - mySock->SendDataOnly(defaultVal,MAX_STR_LENGTH); + n += mySock->SendDataOnly(defaultVal,MAX_STR_LENGTH); else { - mySock->SendDataOnly(path,MAX_STR_LENGTH); + n += mySock->SendDataOnly(path,MAX_STR_LENGTH); delete[] path; } @@ -659,43 +660,43 @@ int slsReceiverTCPIPInterface::send_update() { #ifdef SLS_RECEIVER_UDP_FUNCTIONS ind=receiverBase->getFileIndex(); #endif - mySock->SendDataOnly(&ind,sizeof(ind)); + n += mySock->SendDataOnly(&ind,sizeof(ind)); //file format #ifdef SLS_RECEIVER_UDP_FUNCTIONS ind=(int)receiverBase->getFileFormat(); #endif - mySock->SendDataOnly(&ind,sizeof(ind)); + n += mySock->SendDataOnly(&ind,sizeof(ind)); // file write enable #ifdef SLS_RECEIVER_UDP_FUNCTIONS ind=(int)receiverBase->getFileWriteEnable(); #endif - mySock->SendDataOnly(&ind,sizeof(ind)); + n += mySock->SendDataOnly(&ind,sizeof(ind)); // file overwrite enable #ifdef SLS_RECEIVER_UDP_FUNCTIONS ind=(int)receiverBase->getOverwriteEnable(); #endif - mySock->SendDataOnly(&ind,sizeof(ind)); + n += mySock->SendDataOnly(&ind,sizeof(ind)); // receiver read frequency #ifdef SLS_RECEIVER_UDP_FUNCTIONS ind=(int)receiverBase->getFrameToGuiFrequency(); #endif - mySock->SendDataOnly(&ind,sizeof(ind)); + n += mySock->SendDataOnly(&ind,sizeof(ind)); // streaming port #ifdef SLS_RECEIVER_UDP_FUNCTIONS ind=(int)receiverBase->getStreamingPort(); #endif - mySock->SendDataOnly(&ind,sizeof(ind)); + n += mySock->SendDataOnly(&ind,sizeof(ind)); // data streaming enable #ifdef SLS_RECEIVER_UDP_FUNCTIONS ind=(int)receiverBase->getDataStreamEnable(); #endif - mySock->SendDataOnly(&ind,sizeof(ind)); + n += mySock->SendDataOnly(&ind,sizeof(ind)); if (!lockStatus) strcpy(mySock->lastClientIP,mySock->thisClientIP);