diff --git a/RELEASE.txt b/RELEASE.txt index e8cbb6080..4e6869d0c 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -952,7 +952,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 Jungfrau 04.11.2022 (v1.4, HW v1.0) 03.11.2022 (v2.4, HW v2.0) - Mythen3 24.01.2023 (v1.4)? + Mythen3 24.01.2023 (v1.4) Gotthard2 23.11.2022 (v0.3) diff --git a/slsDetectorSoftware/include/sls/Detector.h b/slsDetectorSoftware/include/sls/Detector.h index ca33a92f7..fb106df89 100644 --- a/slsDetectorSoftware/include/sls/Detector.h +++ b/slsDetectorSoftware/include/sls/Detector.h @@ -1476,8 +1476,9 @@ class Detector { Result getADCConfiguration(const int chipIndex, const int adcIndex, Positions pos = {}) const; - /** [Gotthard2] configures one chip at a time for specific adc, chipIndex - * and adcIndex is -1 for all */ + /** [Gotthard2] configures one chip at a time for specific adc, chipIndex. + * -1 for all. Setting specific chip index not implemented in hardware yet + */ void setADCConfiguration(const int chipIndex, const int adcIndex, const int value, Positions pos = {}); diff --git a/slsDetectorSoftware/src/CmdProxy.cpp b/slsDetectorSoftware/src/CmdProxy.cpp index c8e6be210..f76b8f779 100644 --- a/slsDetectorSoftware/src/CmdProxy.cpp +++ b/slsDetectorSoftware/src/CmdProxy.cpp @@ -2393,7 +2393,8 @@ std::string CmdProxy::ConfigureADC(int action) { std::ostringstream os; os << cmd << ' '; if (action == defs::HELP_ACTION) { - os << "[chip index 0-10, -1 for all] [adc index 0-31, -1 for all] [12 " + os << "[chip index 0-9 [setting individual chips not yet implemented], " + "-1 for all] [adc index 0-31, -1 for all] [7 " "bit configuration value in hex]\n\t[Gotthard2] Sets " "configuration for specific chip and adc, but configures 1 chip " "(all adcs for that chip) at a time." diff --git a/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp b/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp index fbe801ba1..8441b6321 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp @@ -702,11 +702,11 @@ TEST_CASE("confadc", "[.cmd]") { } } - REQUIRE_THROWS(proxy.Call("confadc", {"11", "2", "0x3ff"}, -1, + REQUIRE_THROWS(proxy.Call("confadc", {"11", "2", "0x7f"}, -1, PUT)); // invalid chip index - REQUIRE_THROWS(proxy.Call("confadc", {"-1", "10", "0x3ff"}, -1, + REQUIRE_THROWS(proxy.Call("confadc", {"-1", "32", "0x7f"}, -1, PUT)); // invalid adc index - REQUIRE_THROWS(proxy.Call("confadc", {"-1", "10", "0x1fff"}, -1, + REQUIRE_THROWS(proxy.Call("confadc", {"-1", "10", "0x80"}, -1, PUT)); // invalid value { std::ostringstream oss; @@ -718,12 +718,14 @@ TEST_CASE("confadc", "[.cmd]") { proxy.Call("confadc", {"2", "3"}, -1, GET, oss); REQUIRE(oss.str() == "confadc 0x11\n"); } + + // doesnt exist in hw yet to set individual chips (no file) for (int i = 0; i != ndet; ++i) { - for (int j = 0; j != nchip; ++j) { - for (int k = 0; k != nadc; ++k) { - det.setADCConfiguration(j, k, prev_val[i][j][k], {i}); - } + // for (int j = 0; j != nchip; ++j) { + for (int k = 0; k != nadc; ++k) { + det.setADCConfiguration(-1, k, prev_val[i][0][k], {i}); } + //} } } else { REQUIRE_THROWS(proxy.Call("confadc", {}, -1, GET));