mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-13 18:01:43 +01:00
changes from 4.2.0-rc: eiger check for max trimbits; end of eigerserver: if detector ip, set activate; update both control and stop server for activate
This commit is contained in:
Binary file not shown.
@@ -268,6 +268,9 @@ u_int32_t getDetectorIP() {
|
||||
#endif
|
||||
fgets(output, sizeof(output), sysFile);
|
||||
pclose(sysFile);
|
||||
if (strlen(output) <= 1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
//converting IPaddress to hex.
|
||||
char* pcword = strtok (output,".");
|
||||
@@ -315,6 +318,14 @@ void initControlServer() {
|
||||
FILE_LOG(logDEBUG1, ("Control server: BEB Initialization done\n"));
|
||||
|
||||
setupDetector();
|
||||
// activate (if it gets ip) (later FW will deactivate at startup)
|
||||
if (getDetectorIP() != 0) {
|
||||
Beb_Activate(1);
|
||||
Feb_Control_activate(1);
|
||||
} else {
|
||||
Beb_Activate(0);
|
||||
Feb_Control_activate(0);
|
||||
}
|
||||
}
|
||||
initCheckDone = 1;
|
||||
#endif
|
||||
@@ -330,6 +341,15 @@ void initStopServer() {
|
||||
Feb_Control_FebControl();
|
||||
Feb_Control_Init(master,top,normal,getDetectorNumber());
|
||||
FILE_LOG(logDEBUG1, ("Stop server: FEB Initialization done\n"));
|
||||
// activate (if it gets ip) (later FW will deactivate at startup)
|
||||
// also needed for stop server for status
|
||||
if (getDetectorIP() != 0) {
|
||||
Beb_Activate(1);
|
||||
Feb_Control_activate(1);
|
||||
} else {
|
||||
Beb_Activate(0);
|
||||
Feb_Control_activate(0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,8 @@ enum CLKINDEX {RUN_CLK, NUM_CLOCKS};
|
||||
#define DEFAULT_TEST_MODE (0)
|
||||
#define DEFAULT_HIGH_VOLTAGE (0)
|
||||
|
||||
#define MAX_TRIMBITS_VALUE (63)
|
||||
|
||||
#define MAX_ROWS_PER_READOUT (256)
|
||||
#define MAX_PACKETS_PER_REQUEST (256)
|
||||
|
||||
|
||||
@@ -2983,9 +2983,9 @@ int set_all_trimbits(int file_des) {
|
||||
|
||||
// set
|
||||
if (arg >= 0 && Server_VerifyLock() == OK) {
|
||||
if (arg > 63) {
|
||||
if (arg > MAX_TRIMBITS_VALUE) {
|
||||
ret = FAIL;
|
||||
strcpy(mess, "Cannot set all trimbits. Range: 0 - 63\n");
|
||||
sprintf(mess, "Cannot set all trimbits. Range: 0 - %d\n", MAX_TRIMBITS_VALUE);
|
||||
FILE_LOG(logERROR, (mess));
|
||||
} else {
|
||||
ret = setAllTrimbits(arg);
|
||||
|
||||
Reference in New Issue
Block a user