From 42257d8f67f9db33975aad3a85f8c46ea438c574 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 6 Aug 2021 08:18:34 +0200 Subject: [PATCH] wip --- slsDetectorSoftware/include/sls/Detector.h | 7 +++++++ slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp | 10 ++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/slsDetectorSoftware/include/sls/Detector.h b/slsDetectorSoftware/include/sls/Detector.h index 5401b4233..6ad3b0826 100644 --- a/slsDetectorSoftware/include/sls/Detector.h +++ b/slsDetectorSoftware/include/sls/Detector.h @@ -1199,6 +1199,13 @@ class Detector { */ void setGainMode(const defs::gainMode mode, Positions pos = {}); + /** [Jungfrau] Advanced */ + Result getFilterCell(Positions pos = {}) const; + + /** [Jungfrau] Advanced Options[0-12] + */ + void setFilterCell(int cell, Positions pos = {}); + ///@{ /** @name Gotthard Specific */ diff --git a/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp b/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp index fbf2421fb..741565e90 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp @@ -505,8 +505,8 @@ TEST_CASE("filtercell", "[.cmd]") { } { std::ostringstream oss; - proxy.Call("filtercell", {"15"}, -1, PUT, oss); - REQUIRE(oss.str() == "filtercell 15\n"); + proxy.Call("filtercell", {"12"}, -1, PUT, oss); + REQUIRE(oss.str() == "filtercell 12\n"); } { std::ostringstream oss; @@ -518,8 +518,10 @@ TEST_CASE("filtercell", "[.cmd]") { proxy.Call("filtercell", {}, -1, GET, oss); REQUIRE(oss.str() == "filtercell 0\n"); } - REQUIRE_THROWS(proxy.Call("filtercell", {"16"}, -1, PUT)); - det.setFilterCell(prev_val); + REQUIRE_THROWS(proxy.Call("filtercell", {"13"}, -1, PUT)); + for (int i = 0; i != det.size(); ++i) { + det.setFilterCell(prev_val[i], {i}); + } } // chip version 1.0 else {