From bcb5b8047b142d0fb93983f6b1ce0ee951681b67 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 15 Jun 2020 16:41:40 +0200 Subject: [PATCH] WIP --- slsDetectorServers/eigerDetectorServer/FebControl.c | 12 +++++------- .../eigerDetectorServer/slsDetectorFunctionList.c | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/slsDetectorServers/eigerDetectorServer/FebControl.c b/slsDetectorServers/eigerDetectorServer/FebControl.c index 403e0355f..1b1c90912 100644 --- a/slsDetectorServers/eigerDetectorServer/FebControl.c +++ b/slsDetectorServers/eigerDetectorServer/FebControl.c @@ -20,7 +20,7 @@ char Module_dac_names[16][10] = {"VSvP", "Vtrim", "Vrpreamp", "Vrshaper", "Vcal", "Vcmp_rl", "rxb_rb", "rxb_lb", "Vcmp_rr", "Vcp", "Vcn", "Vishaper"}; -struct Module modules[10]; +struct Module modules[2]; int moduleSize = 0; unsigned int @@ -833,13 +833,11 @@ int Feb_Control_SetTrimbits(unsigned int *trimbits, int top) { if (Feb_Control_activated) { if (!Feb_Interface_WriteMemoryInLoops( - Module_GetLeftAddress( - &modules[Feb_Control_current_index]), - 0, 0, 1024, trimbits_to_load_l) || + Module_GetLeftAddress(&modules[1]), 0, 0, 1024, + trimbits_to_load_l) || !Feb_Interface_WriteMemoryInLoops( - Module_GetRightAddress( - &modules[Feb_Control_current_index]), - 0, 0, 1024, trimbits_to_load_r) || + Module_GetRightAddress(&modules[1]), 0, 0, 1024, + trimbits_to_load_r) || (Feb_Control_StartDAQOnlyNWaitForFinish(5000) != STATUS_IDLE)) { LOG(logERROR, (" some errror in setting trimbits!\n")); diff --git a/slsDetectorServers/eigerDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/eigerDetectorServer/slsDetectorFunctionList.c index 37a8131d5..424362fef 100644 --- a/slsDetectorServers/eigerDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/eigerDetectorServer/slsDetectorFunctionList.c @@ -1495,7 +1495,7 @@ int setQuad(int value) { return OK; } // only top can be set to quad - if (!top & value > 0) { + if (!top && value > 0) { LOG(logERROR, ("Only a top can be set to quad\n")); return FAIL; }