mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 06:50:02 +02:00
merge conflict fix
This commit is contained in:
commit
8cc9cd1c75
Binary file not shown.
@ -1106,7 +1106,7 @@ int Feb_Control_SendSoftwareTrigger() {
|
|||||||
LOG(logERROR, ("Could not give software trigger\n"));
|
LOG(logERROR, ("Could not give software trigger\n"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
LOG(logINFO, ("Software Internal Trigger Sent!\n"));
|
LOG(logDEBUG1, ("Software Internal Trigger Sent!\n"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1129,7 +1129,7 @@ int Feb_Control_SoftwareTrigger(int block) {
|
|||||||
|
|
||||||
// wait for next trigger ready
|
// wait for next trigger ready
|
||||||
if (block) {
|
if (block) {
|
||||||
LOG(logINFO, ("Blocking Software Trigger\n"));
|
LOG(logDEBUG1, ("Blocking Software Trigger\n"));
|
||||||
int readyForTrigger = 0;
|
int readyForTrigger = 0;
|
||||||
if (!Feb_Control_IsReadyForTrigger(&readyForTrigger)) {
|
if (!Feb_Control_IsReadyForTrigger(&readyForTrigger)) {
|
||||||
LOG(logERROR, ("Could not read FEB_REG_STATUS reg after giving "
|
LOG(logERROR, ("Could not read FEB_REG_STATUS reg after giving "
|
||||||
@ -1138,6 +1138,15 @@ int Feb_Control_SoftwareTrigger(int block) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (!readyForTrigger) {
|
while (!readyForTrigger) {
|
||||||
|
// end of acquisition (cannot monitor readyForTrigger)
|
||||||
|
int status = Feb_Control_AcquisitionInProgress();
|
||||||
|
if (status == STATUS_ERROR) {
|
||||||
|
LOG(logERROR, ("Status: ERROR reading DAQ status register\n"));
|
||||||
|
return 0;
|
||||||
|
} else if (status == STATUS_IDLE) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
usleep(5000);
|
usleep(5000);
|
||||||
if (!Feb_Control_IsReadyForTrigger(&readyForTrigger)) {
|
if (!Feb_Control_IsReadyForTrigger(&readyForTrigger)) {
|
||||||
LOG(logERROR, ("Could not read FEB_REG_STATUS reg after "
|
LOG(logERROR, ("Could not read FEB_REG_STATUS reg after "
|
||||||
@ -1145,8 +1154,10 @@ int Feb_Control_SoftwareTrigger(int block) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG(logINFO, ("Done waiting (wait for trigger)!\n"));
|
LOG(logDEBUG2, ("Done waiting (wait for trigger)!\n"));
|
||||||
}
|
}
|
||||||
|
LOG(logINFO, ("%s Software Trigger %s\n", (block ? "Blocking" : "Non blocking"), (block ? "Acquired" : "Sent")));
|
||||||
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
Binary file not shown.
@ -434,8 +434,9 @@ int readConfigFile() {
|
|||||||
master = -1;
|
master = -1;
|
||||||
top = -1;
|
top = -1;
|
||||||
|
|
||||||
char fname[128];
|
const int fileNameSize = 128;
|
||||||
if (getAbsPath(fname, 128, CONFIG_FILE) == FAIL) {
|
char fname[fileNameSize];
|
||||||
|
if (getAbsPath(fname, fileNameSize, CONFIG_FILE) == FAIL) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
@ -530,8 +530,9 @@ int readConfigFile() {
|
|||||||
|
|
||||||
usleep(INITIAL_STARTUP_WAIT);
|
usleep(INITIAL_STARTUP_WAIT);
|
||||||
|
|
||||||
char fname[128];
|
const int fileNameSize = 128;
|
||||||
if (getAbsPath(fname, 128, CONFIG_FILE) == FAIL) {
|
char fname[fileNameSize];
|
||||||
|
if (getAbsPath(fname, fileNameSize, CONFIG_FILE) == FAIL) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1833,15 +1834,23 @@ int checkDetectorType() {
|
|||||||
int type = atoi(buffer);
|
int type = atoi(buffer);
|
||||||
if (type > TYPE_NO_MODULE_STARTING_VAL) {
|
if (type > TYPE_NO_MODULE_STARTING_VAL) {
|
||||||
LOG(logERROR,
|
LOG(logERROR,
|
||||||
("No Module attached! Expected %d for Gotthard2, got %d\n",
|
("No Module attached! Expected %d, %d or %d for Gotthard2, got %d\n",
|
||||||
TYPE_GOTTHARD2_MODULE_VAL, type));
|
TYPE_GOTTHARD2_MODULE_VAL,
|
||||||
|
TYPE_GOTTHARD2_25UM_MASTER_MODULE_VAL,
|
||||||
|
TYPE_GOTTHARD2_25UM_SLAVE_MODULE_VAL,
|
||||||
|
type));
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (abs(type - TYPE_GOTTHARD2_MODULE_VAL) > TYPE_TOLERANCE) {
|
if ((abs(type - TYPE_GOTTHARD2_MODULE_VAL) > TYPE_TOLERANCE) &&
|
||||||
|
(abs(type - TYPE_GOTTHARD2_25UM_MASTER_MODULE_VAL) > TYPE_TOLERANCE) &&
|
||||||
|
(abs(type - TYPE_GOTTHARD2_25UM_SLAVE_MODULE_VAL) > TYPE_TOLERANCE)) {
|
||||||
LOG(logERROR,
|
LOG(logERROR,
|
||||||
("Wrong Module attached! Expected %d for Gotthard2, got %d\n",
|
("Wrong Module attached! Expected %d, %d or %d for Gotthard2, got %d\n",
|
||||||
TYPE_GOTTHARD2_MODULE_VAL, type));
|
TYPE_GOTTHARD2_MODULE_VAL,
|
||||||
|
TYPE_GOTTHARD2_25UM_MASTER_MODULE_VAL,
|
||||||
|
TYPE_GOTTHARD2_25UM_SLAVE_MODULE_VAL,
|
||||||
|
type));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
|
@ -26,7 +26,10 @@
|
|||||||
#define ADU_MAX_BITS (12)
|
#define ADU_MAX_BITS (12)
|
||||||
#define MAX_FRAMES_IN_BURST_MODE (2720)
|
#define MAX_FRAMES_IN_BURST_MODE (2720)
|
||||||
#define TYPE_GOTTHARD2_MODULE_VAL (536)
|
#define TYPE_GOTTHARD2_MODULE_VAL (536)
|
||||||
#define TYPE_TOLERANCE (10)
|
#define TYPE_GOTTHARD2_25UM_MASTER_MODULE_VAL (683)
|
||||||
|
#define TYPE_GOTTHARD2_25UM_SLAVE_MODULE_VAL (704)
|
||||||
|
#define TYPE_GOTTHARD2_MODULE_VAL (536)
|
||||||
|
#define TYPE_TOLERANCE (5)
|
||||||
#define TYPE_NO_MODULE_STARTING_VAL (800)
|
#define TYPE_NO_MODULE_STARTING_VAL (800)
|
||||||
#define INITIAL_STARTUP_WAIT (1 * 1000 * 1000)
|
#define INITIAL_STARTUP_WAIT (1 * 1000 * 1000)
|
||||||
|
|
||||||
|
Binary file not shown.
@ -588,8 +588,9 @@ void setGbitReadout() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int readConfigFile() {
|
int readConfigFile() {
|
||||||
char fname[128];
|
const int fileNameSize = 128;
|
||||||
if (getAbsPath(fname, 128, CONFIG_FILE) == FAIL) {
|
char fname[fileNameSize];
|
||||||
|
if (getAbsPath(fname, fileNameSize, CONFIG_FILE) == FAIL) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
@ -286,6 +286,9 @@ u_int16_t getHardwareSerialNumber() {
|
|||||||
|
|
||||||
// is board 1.0?, with value 2 (resistor network)
|
// is board 1.0?, with value 2 (resistor network)
|
||||||
int isHardwareVersion2() {
|
int isHardwareVersion2() {
|
||||||
|
#ifdef VIRTUAL
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
return (((bus_r(MOD_SERIAL_NUM_REG) & HARDWARE_VERSION_NUM_MSK) ==
|
return (((bus_r(MOD_SERIAL_NUM_REG) & HARDWARE_VERSION_NUM_MSK) ==
|
||||||
HARDWARE_VERSION_2_VAL)
|
HARDWARE_VERSION_2_VAL)
|
||||||
? 1
|
? 1
|
||||||
@ -484,8 +487,9 @@ int readConfigFile() {
|
|||||||
return initError;
|
return initError;
|
||||||
}
|
}
|
||||||
|
|
||||||
char fname[128];
|
const int fileNameSize = 128;
|
||||||
if (getAbsPath(fname, 128, CONFIG_FILE) == FAIL) {
|
char fname[fileNameSize];
|
||||||
|
if (getAbsPath(fname, fileNameSize, CONFIG_FILE) == FAIL) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -576,6 +580,13 @@ int readConfigFile() {
|
|||||||
// validations
|
// validations
|
||||||
chipVersion = version;
|
chipVersion = version;
|
||||||
LOG(logINFOBLUE, ("Chip Version: v%.01f\n", chipVersion / 10.0));
|
LOG(logINFOBLUE, ("Chip Version: v%.01f\n", chipVersion / 10.0));
|
||||||
|
|
||||||
|
// version 1.1 and HW 1.0 (version reg value = 2) is incompatible
|
||||||
|
if (chipVersion == 11 && isHardwareVersion2()) {
|
||||||
|
strcpy(initErrorMessage,
|
||||||
|
"Chip version 1.1 (from on-board config file) is incompatible with old board (v1.0). Please update board or correct on-board config file.\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(line, 0, LZ);
|
memset(line, 0, LZ);
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -21,7 +21,7 @@
|
|||||||
#define TYPE_FILE_NAME ("/etc/devlinks/type")
|
#define TYPE_FILE_NAME ("/etc/devlinks/type")
|
||||||
#define DAC_MAX_MV (2048)
|
#define DAC_MAX_MV (2048)
|
||||||
#define TYPE_MYTHEN3_MODULE_VAL (93)
|
#define TYPE_MYTHEN3_MODULE_VAL (93)
|
||||||
#define TYPE_TOLERANCE (10)
|
#define TYPE_TOLERANCE (5)
|
||||||
#define TYPE_NO_MODULE_STARTING_VAL (800)
|
#define TYPE_NO_MODULE_STARTING_VAL (800)
|
||||||
#define MAX_EXT_SIGNALS (8)
|
#define MAX_EXT_SIGNALS (8)
|
||||||
|
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
#define APILIB 0x210225
|
#define APILIB 0x210225
|
||||||
#define APIRECEIVER 0x210225
|
#define APIRECEIVER 0x210225
|
||||||
#define APIGUI 0x210225
|
#define APIGUI 0x210225
|
||||||
#define APICTB 0x210722
|
#define APICTB 0x210727
|
||||||
#define APIGOTTHARD 0x210722
|
#define APIGOTTHARD 0x210727
|
||||||
#define APIGOTTHARD2 0x210722
|
#define APIGOTTHARD2 0x210727
|
||||||
#define APIMYTHEN3 0x210722
|
#define APIMYTHEN3 0x210727
|
||||||
#define APIMOENCH 0x210722
|
#define APIMOENCH 0x210727
|
||||||
#define APIEIGER 0x210722
|
#define APIEIGER 0x210727
|
||||||
#define APIJUNGFRAU 0x210723
|
#define APIJUNGFRAU 0x210727
|
||||||
|
Loading…
x
Reference in New Issue
Block a user