mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
Merge branch 'test' into developer
This commit is contained in:
Binary file not shown.
@ -1622,9 +1622,6 @@ int setDetectorPosition(int pos[]) {
|
||||
int *getDetectorPosition() { return detPos; }
|
||||
|
||||
int enableTenGigabitEthernet(int val) {
|
||||
#ifdef VIRTUAL
|
||||
return 0;
|
||||
#endif
|
||||
uint32_t addr = CONFIG_REG;
|
||||
|
||||
// set
|
||||
|
Binary file not shown.
@ -96,6 +96,8 @@ uint64_t eiger_virtual_startingframenumber = 1;
|
||||
int eiger_virtual_detPos[2] = {0, 0};
|
||||
int eiger_virtual_test_mode = 0;
|
||||
int eiger_virtual_quad_mode = 0;
|
||||
int eiger_virtual_read_nlines = 256;
|
||||
int eiger_virtual_interrupt_subframe = 0;
|
||||
#endif
|
||||
|
||||
int isInitCheckDone() { return initCheckDone; }
|
||||
@ -1516,13 +1518,15 @@ int setInterruptSubframe(int value) {
|
||||
if (!Feb_Control_SetInterruptSubframe(value)) {
|
||||
return FAIL;
|
||||
}
|
||||
#else
|
||||
eiger_virtual_interrupt_subframe = value;
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
|
||||
int getInterruptSubframe() {
|
||||
#ifdef VIRTUAL
|
||||
return 0;
|
||||
return eiger_virtual_interrupt_subframe;
|
||||
#else
|
||||
return Feb_Control_GetInterruptSubframe();
|
||||
#endif
|
||||
@ -1536,13 +1540,15 @@ int setReadNLines(int value) {
|
||||
return FAIL;
|
||||
}
|
||||
Beb_SetReadNLines(value);
|
||||
#else
|
||||
eiger_virtual_read_nlines = value;
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
|
||||
int getReadNLines() {
|
||||
#ifdef VIRTUAL
|
||||
return 0;
|
||||
return eiger_virtual_read_nlines;
|
||||
#else
|
||||
return Feb_Control_GetReadNLines();
|
||||
#endif
|
||||
@ -1835,6 +1841,7 @@ void setExternalGating(int enable[]) {
|
||||
}
|
||||
|
||||
int setAllTrimbits(int val) {
|
||||
LOG(logINFO, ("Setting all trimbits to %d\n", val));
|
||||
#ifndef VIRTUAL
|
||||
if (!Feb_Control_SaveAllTrimbitsTo(val, top)) {
|
||||
LOG(logERROR, ("Could not set all trimbits\n"));
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1255,9 +1255,6 @@ int setDetectorPosition(int pos[]) {
|
||||
int *getDetectorPosition() { return detPos; }
|
||||
|
||||
int enableTenGigabitEthernet(int val) {
|
||||
#ifdef VIRTUAL
|
||||
return 0;
|
||||
#endif
|
||||
uint32_t addr = CONFIG_REG;
|
||||
|
||||
// set
|
||||
|
Binary file not shown.
@ -177,7 +177,9 @@ int main(int argc, char *argv[]) {
|
||||
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
rebootNiosControllerAndFPGA();
|
||||
#else
|
||||
#ifndef VIRTUAL
|
||||
system("reboot");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
LOG(logINFO, ("Goodbye!\n"));
|
||||
|
@ -2591,8 +2591,8 @@ int get_period_left(int file_des) {
|
||||
memset(mess, 0, sizeof(mess));
|
||||
int64_t retval = -1;
|
||||
|
||||
#if !defined(JUNGFRAUD) && !defined(GOTTHARDD) && !defined(CHIPTESTBOARDD) && \
|
||||
!defined(MOENCHD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D)
|
||||
#if !defined(JUNGFRAUD) && !defined(GOTTHARDD) /* && !defined(CHIPTESTBOARDD) \
|
||||
&& !defined(MOENCHD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D)*/
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// get only
|
||||
@ -2607,8 +2607,8 @@ int get_delay_after_trigger_left(int file_des) {
|
||||
memset(mess, 0, sizeof(mess));
|
||||
int64_t retval = -1;
|
||||
|
||||
#if !defined(JUNGFRAUD) && !defined(GOTTHARDD) && !defined(CHIPTESTBOARDD) && \
|
||||
!defined(MOENCHD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D)
|
||||
#if !defined(JUNGFRAUD) && !defined(GOTTHARDD) /* && !defined(CHIPTESTBOARDD) \
|
||||
&& !defined(MOENCHD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D)*/
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// get only
|
||||
@ -4775,7 +4775,7 @@ int set_read_n_lines(int file_des) {
|
||||
} else {
|
||||
if (setReadNLines(arg) == FAIL) {
|
||||
ret = FAIL;
|
||||
sprintf(mess, "Could not set read n lines.\n");
|
||||
sprintf(mess, "Could not set read n lines to %d.\n", arg);
|
||||
LOG(logERROR, (mess));
|
||||
} else {
|
||||
int retval = getReadNLines();
|
||||
@ -5633,7 +5633,8 @@ int set_readout_mode(int file_des) {
|
||||
if (ret == OK) {
|
||||
if (setReadoutMode(arg) == FAIL) {
|
||||
ret = FAIL;
|
||||
sprintf(mess, "Could not set readout mode\n");
|
||||
sprintf(mess, "Could not set readout mode. Check #samples or "
|
||||
"memory allocation\n");
|
||||
LOG(logERROR, (mess));
|
||||
} else {
|
||||
int retval = getReadoutMode();
|
||||
|
Reference in New Issue
Block a user