Merge branch 'developer' of git.psi.ch:sls_detectors_software/sls_detector_software into developer

This commit is contained in:
Dhanya Maliakal
2017-11-22 15:08:33 +01:00
4 changed files with 106 additions and 18 deletions

View File

@ -2725,6 +2725,8 @@ int slsDetector::setChannel(sls_detector_channel chan){
int ichip=chan.chip;
int imod=chan.module;
cout << "Set chan " << ichan << " chip " <<ichip << " mod " << imod << " reg " << hex << chan.reg << endl;
if (thisDetector->onlineFlag==ONLINE_FLAG) {
if (connectControl() == OK){
controlSocket->SendDataOnly(&fnum,sizeof(fnum));
@ -8062,14 +8064,22 @@ string slsDetector::setFileName(string s) {
if(ret==FORCE_UPDATE)
updateReceiver();
return sretval;
} else {
if(!s.empty()){
pthread_mutex_lock(&ms);
fileIO::setFileName(s);
pthread_mutex_unlock(&ms);
}
pthread_mutex_lock(&ms);
s = fileIO::getFileName();
pthread_mutex_unlock(&ms);
return s;
}
/*pthread_mutex_lock(&ms);
s = fileIO::getFileName();
pthread_mutex_unlock(&ms);
return s;*/
return sretval;
}

View File

@ -275,7 +275,8 @@ int slsDetectorUtils::acquire(int delflag){
pthread_mutex_unlock(&mp);
//send receiver file name
pthread_mutex_lock(&mg); //cout << "lock"<< endl;
setFileName(fileIO::getFileName());
setFileName(fileIO::getFileName());
//start receiver
if(startReceiver() == FAIL) {