mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
jungfrau server has same resetfpga, programfpga and debug mode as developer branch, eiger server has effects from debug flag, but not compiled
This commit is contained in:
@ -37,7 +37,8 @@ int sockfd; // (updated in slsDetectorServer) as extern
|
||||
int (*flist[NUM_DET_FUNCTIONS])(int);
|
||||
char mess[MAX_STR_LENGTH];
|
||||
int dataBytes = 10;
|
||||
|
||||
int isControlServer = 0;
|
||||
int debugflag = 0;
|
||||
|
||||
/* initialization functions */
|
||||
|
||||
@ -46,9 +47,10 @@ int printSocketReadError() {
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
void basictests() {
|
||||
void basictests(int flag) {
|
||||
debugflag = flag;
|
||||
#ifdef SLS_DETECTOR_FUNCTION_LIST
|
||||
checkFirmwareCompatibility();
|
||||
checkFirmwareCompatibility(debugflag);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -59,8 +61,10 @@ void init_detector(int controlserver) {
|
||||
#endif
|
||||
|
||||
#ifdef SLS_DETECTOR_FUNCTION_LIST
|
||||
if (controlserver)
|
||||
if (controlserver) {
|
||||
isControlServer = 1;
|
||||
initControlServer();
|
||||
}
|
||||
else initStopServer();
|
||||
#endif
|
||||
strcpy(mess,"dummy message");
|
||||
@ -4601,6 +4605,9 @@ int program_fpga(int file_des) {
|
||||
#ifdef VERY_VERBOSE
|
||||
printf("Done with program receiving command\n");
|
||||
#endif
|
||||
if (isControlServer)
|
||||
basictests(debugflag);
|
||||
init_detector(isControlServer);
|
||||
}
|
||||
#endif
|
||||
if (ret==OK)
|
||||
@ -4646,7 +4653,9 @@ int reset_fpga(int file_des) {
|
||||
}
|
||||
#ifdef SLS_DETECTOR_FUNCTION_LIST
|
||||
else {
|
||||
initControlServer();
|
||||
if (isControlServer)
|
||||
basictests(debugflag);
|
||||
initControlServer(isControlServer);
|
||||
ret = FORCE_UPDATE;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user