mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 14:38:14 +02: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:
parent
9467b4c610
commit
dea8cba985
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);
|
||||
|
@ -2685,6 +2685,7 @@ int slsDetector::activate(int enable) {
|
||||
int retval = -1;
|
||||
FILE_LOG(logDEBUG1) << "Setting activate flag to " << enable;
|
||||
sendToDetector(F_ACTIVATE, enable, retval);
|
||||
sendToDetectorStop(F_ACTIVATE, enable, retval);
|
||||
FILE_LOG(logDEBUG1) << "Activate: " << retval;
|
||||
shm()->activated = static_cast<bool>(retval);
|
||||
if (shm()->useReceiverFlag) {
|
||||
|
@ -1241,7 +1241,7 @@ void Implementation::setSubPeriod(const uint64_t i) {
|
||||
FILE_LOG(logDEBUG3) << __SHORT_AT__ << " called";
|
||||
|
||||
subPeriod = i;
|
||||
FILE_LOG(logINFO) << "Sub Exposure Period: " << (double)subPeriod / (1E9)
|
||||
FILE_LOG(logINFO) << "Sub Period: " << (double)subPeriod / (1E9)
|
||||
<< "s";
|
||||
}
|
||||
|
||||
|
@ -3,10 +3,10 @@
|
||||
#define APILIB 0x200227
|
||||
#define APIRECEIVER 0x200227
|
||||
#define APIGUI 0x200227
|
||||
#define APIEIGER 0x200310
|
||||
#define APICTB 0x200310
|
||||
#define APIGOTTHARD 0x200310
|
||||
#define APIGOTTHARD2 0x200310
|
||||
#define APIJUNGFRAU 0x200310
|
||||
#define APIMYTHEN3 0x200310
|
||||
#define APIMOENCH 0x200310
|
||||
#define APIEIGER 0x200310
|
||||
|
Loading…
x
Reference in New Issue
Block a user