From e2d7d12b3ea332c4907cca5bfc47071e82863441 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Wed, 6 Oct 2021 17:51:25 +0200 Subject: [PATCH] wip --- .../eigerDetectorServer/slsDetectorFunctionList.c | 10 +++++----- slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp | 2 +- slsDetectorSoftware/tests/test-CmdProxy.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/slsDetectorServers/eigerDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/eigerDetectorServer/slsDetectorFunctionList.c index eb44e5aaa..717ea5bc3 100644 --- a/slsDetectorServers/eigerDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/eigerDetectorServer/slsDetectorFunctionList.c @@ -2047,17 +2047,17 @@ int setAllTrimbits(int val) { } int getAllTrimbits() { - int value = *((detectorModules->chanregs)); if (detectorModules) { + int value = (*((detectorModules->chanregs))); for (int ichan = 0; ichan < (detectorModules->nchan); ichan++) { if (*((detectorModules->chanregs) + ichan) != value) { - value = -1; - break; + return -1; } } + LOG(logINFO, ("Value of all Trimbits: %d\n", value)); + return value; } - LOG(logINFO, ("Value of all Trimbits: %d\n", value)); - return value; + return -1; } int getBebFPGATemp() { diff --git a/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp b/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp index b71d9678e..798498a2c 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp @@ -287,7 +287,7 @@ TEST_CASE("comp_disable_time", "[.cmd]") { Detector det; CmdProxy proxy(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::JUNGFRAU) { + if (det_type == defs::JUNGFRAU && det.getChipVersion().squash()*10 == 11) { auto prev_val = det.getComparatorDisableTime(); { std::ostringstream oss; diff --git a/slsDetectorSoftware/tests/test-CmdProxy.cpp b/slsDetectorSoftware/tests/test-CmdProxy.cpp index e72ae63ba..b311429aa 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy.cpp @@ -345,7 +345,7 @@ TEST_CASE("thresholdnotb", "[.cmd]") { std::string senergy = std::to_string(prev_energies[0]); std::ostringstream oss1, oss2; proxy.Call("thresholdnotb", {senergy, "standard"}, -1, PUT, oss1); - REQUIRE(oss1.str() == "threshold [" + senergy + ", standard]\n"); + REQUIRE(oss1.str() == "thresholdnotb [" + senergy + ", standard]\n"); proxy.Call("threshold", {}, -1, GET, oss2); REQUIRE(oss2.str() == "threshold " + senergy + "\n"); REQUIRE_THROWS(proxy.Call("thresholdnotb",