mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
some fixes from 4.2.0 that might be important formoench
This commit is contained in:
@ -4952,6 +4952,9 @@ int multiSlsDetector::createReceivingDataSockets(const bool destroy) {
|
||||
cout << "Destroyed Receiving Data Socket(s)" << endl;
|
||||
return OK;
|
||||
}
|
||||
if (client_downstream) {
|
||||
return OK;
|
||||
}
|
||||
|
||||
cprintf(MAGENTA, "Going to create data sockets\n");
|
||||
|
||||
|
@ -3242,13 +3242,13 @@ string slsDetector::getSettingsDir() {
|
||||
return std::string(thisDetector->settingsDir);
|
||||
}
|
||||
string slsDetector::setSettingsDir(string s) {
|
||||
sprintf(thisDetector->settingsDir, s.c_str()); return thisDetector->settingsDir;
|
||||
sprintf(thisDetector->settingsDir, "%s", s.c_str()); return thisDetector->settingsDir;
|
||||
}
|
||||
string slsDetector::getCalDir() {
|
||||
return thisDetector->calDir;
|
||||
}
|
||||
string slsDetector::setCalDir(string s) {
|
||||
sprintf(thisDetector->calDir, s.c_str()); return thisDetector->calDir;
|
||||
sprintf(thisDetector->calDir, "%s", s.c_str()); return thisDetector->calDir;
|
||||
}
|
||||
|
||||
|
||||
@ -4432,7 +4432,7 @@ int64_t slsDetector::getTimeLeft(timerIndex index, int imod) {
|
||||
|
||||
|
||||
int fnum=F_GET_TIME_LEFT;
|
||||
int64_t retval;
|
||||
int64_t retval = FAIL;
|
||||
char mess[MAX_STR_LENGTH]="";
|
||||
int ret=OK;
|
||||
|
||||
@ -6057,8 +6057,10 @@ int slsDetector::setUDPConnection() {
|
||||
std::cout << "could not configure mac" << endl;
|
||||
}
|
||||
}
|
||||
}else
|
||||
}else{
|
||||
ret=FAIL;
|
||||
setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC));
|
||||
}
|
||||
#ifdef VERBOSE
|
||||
printReceiverConfiguration();
|
||||
#endif
|
||||
|
@ -846,6 +846,7 @@ virtual int enableDataStreamingFromReceiver(int enable=-1)=0;
|
||||
case RUNNING: return std::string("running");\
|
||||
case TRANSMITTING: return std::string("data"); \
|
||||
case RUN_FINISHED: return std::string("finished"); \
|
||||
case STOPPED: return std::string("stopped"); \
|
||||
default: return std::string("idle"); \
|
||||
}};
|
||||
|
||||
|
@ -64,9 +64,12 @@ int slsDetectorUtils::acquire(int delflag){
|
||||
if(!receiver){
|
||||
setDetectorIndex(-1);
|
||||
}
|
||||
|
||||
|
||||
pthread_mutex_lock(&mg);
|
||||
int nc=setTimer(CYCLES_NUMBER,-1);
|
||||
int nf=setTimer(FRAME_NUMBER,-1);
|
||||
pthread_mutex_unlock(&mg);
|
||||
|
||||
if (nc==0) nc=1;
|
||||
if (nf==0) nf=1;
|
||||
int multiframe = nc*nf;
|
||||
|
@ -93,7 +93,7 @@ class fileIO : public fileIOStatic, public virtual slsDetectorBase {
|
||||
*/
|
||||
virtual std::string setFilePath(std::string s) {
|
||||
pthread_mutex_lock(&mf);
|
||||
sprintf(filePath, s.c_str());
|
||||
sprintf(filePath, "%s", s.c_str());
|
||||
pthread_mutex_unlock(&mf);
|
||||
return std::string(filePath);
|
||||
};
|
||||
|
Reference in New Issue
Block a user