mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 01:58:00 +02:00
fixed stop server not starting up with setup variables (#949)
* m3: fixed stop server not starting up with setup variables * all servers except eiger fixed for virtual stop server to start up with setupDetector function called * virtual tests work * eiger: versions print neednt be in stop server * jungfrau: stop server (not virtual) also needs to read config file * ensuring master is setup for virtual and real servers
This commit is contained in:
Binary file not shown.
@ -403,13 +403,7 @@ void initStopServer() {
|
||||
return;
|
||||
}
|
||||
#ifdef VIRTUAL
|
||||
sharedMemory_setStop(0);
|
||||
setMaster(OW_MASTER);
|
||||
if (readConfigFile() == FAIL ||
|
||||
checkCommandLineConfiguration() == FAIL) {
|
||||
initCheckDone = 1;
|
||||
return;
|
||||
}
|
||||
setupDetector();
|
||||
#endif
|
||||
}
|
||||
initCheckDone = 1;
|
||||
@ -460,8 +454,14 @@ void setupDetector() {
|
||||
memset(vetoGainIndices, 0, sizeof(vetoGainIndices));
|
||||
memset(adcConfiguration, 0, sizeof(adcConfiguration));
|
||||
#ifdef VIRTUAL
|
||||
sharedMemory_setStatus(IDLE);
|
||||
setupUDPCommParameters();
|
||||
if (isControlServer) {
|
||||
sharedMemory_setStatus(IDLE);
|
||||
setupUDPCommParameters();
|
||||
} else {
|
||||
sharedMemory_setStop(0);
|
||||
}
|
||||
// ismaster from reg in stop server, so set it in virtual mode
|
||||
setMaster(OW_MASTER);
|
||||
#endif
|
||||
// pll defines
|
||||
ALTERA_PLL_C10_SetDefines(REG_OFFSET, BASE_READOUT_PLL, BASE_SYSTEM_PLL,
|
||||
@ -2159,7 +2159,6 @@ int *getDetectorPosition() { return detPos; }
|
||||
|
||||
int checkDetectorType(char *mess) {
|
||||
#ifdef VIRTUAL
|
||||
setMaster(OW_MASTER);
|
||||
return OK;
|
||||
#endif
|
||||
LOG(logINFO, ("Checking module type\n"));
|
||||
|
@ -14,7 +14,11 @@
|
||||
|
||||
#define LINKED_SERVER_NAME "gotthard2DetectorServer"
|
||||
|
||||
#ifdef VIRTUAL
|
||||
#define CTRL_SRVR_INIT_TIME_US (3 * 1000 * 1000)
|
||||
#else
|
||||
#define CTRL_SRVR_INIT_TIME_US (300 * 1000)
|
||||
#endif
|
||||
|
||||
/* Hardware Definitions */
|
||||
#define NCHAN (128)
|
||||
|
Reference in New Issue
Block a user