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:
Dhanya Maliakal
2018-01-10 15:49:40 +01:00
parent 6690335971
commit 68d6c514a9
8 changed files with 49 additions and 25 deletions

View File

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