diff --git a/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c index 98bf99f1f..7e72e7ddb 100644 --- a/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c @@ -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 diff --git a/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c index aff1f21b7..7f4aa226a 100644 --- a/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/moenchDetectorServer/slsDetectorFunctionList.c @@ -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 diff --git a/slsDetectorSoftware/src/DetectorImpl.cpp b/slsDetectorSoftware/src/DetectorImpl.cpp index d4308c4ce..bf9dbf451 100644 --- a/slsDetectorSoftware/src/DetectorImpl.cpp +++ b/slsDetectorSoftware/src/DetectorImpl.cpp @@ -357,7 +357,7 @@ void DetectorImpl::setGapPixelsinCallback(const bool enable) { break; default: throw RuntimeError("Gap Pixels is not implemented for " + - multi_shm()->multiDetectorType); + ToString(multi_shm()->multiDetectorType)); } } multi_shm()->gapPixels = enable; diff --git a/slsDetectorSoftware/tests/test-CmdProxy-eiger.cpp b/slsDetectorSoftware/tests/test-CmdProxy-eiger.cpp index 1a9b7b859..c2752e03d 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-eiger.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-eiger.cpp @@ -320,8 +320,6 @@ TEST_CASE("dr", "[.cmd][.new]") { CmdProxy proxy(&det); auto det_type = det.getDetectorType().squash(); if (det_type == defs::EIGER) { - // The only detector currently supporting setting dr - // is EIGER? auto dr = det.getDynamicRange().squash(); std::array vals{4, 8, 16, 32}; for (const auto val : vals) { @@ -332,6 +330,17 @@ TEST_CASE("dr", "[.cmd][.new]") { REQUIRE(oss2.str() == "dr " + std::to_string(val) + '\n'); } det.setDynamicRange(dr); + } else if (det_type == defs::MYTHEN3) { + // not updated in firmware to support anything other than 32 at the + // moment + std::ostringstream oss1, oss2; + proxy.Call("dr", {"32"}, -1, PUT, oss1); + REQUIRE(oss1.str() == "dr 32\n"); + proxy.Call("dr", {"32"}, -1, PUT, oss2); + REQUIRE(oss2.str() == "dr 32\n"); + REQUIRE_THROWS(proxy.Call("dr", {"4"}, -1, PUT)); + REQUIRE_THROWS(proxy.Call("dr", {"8"}, -1, PUT)); + REQUIRE_THROWS(proxy.Call("dr", {"16"}, -1, PUT)); } else { // For the other detectors we should get an error message // except for dr 16 diff --git a/slsDetectorSoftware/tests/test-CmdProxy.cpp b/slsDetectorSoftware/tests/test-CmdProxy.cpp index 602c65ae1..bb5ec6828 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy.cpp @@ -1173,7 +1173,17 @@ TEST_CASE("gappixels", "[.cmd][.new]") { } det.setGapPixelsinCallback(prev_val); } else { - REQUIRE_THROWS(proxy.Call("gappixels", {}, -1, GET)); + { + std::ostringstream oss; + proxy.Call("gappixels", {}, -1, GET, oss); + REQUIRE(oss.str() == "gappixels 0\n"); + } + { + std::ostringstream oss; + proxy.Call("gappixels", {"0"}, -1, PUT, oss); + REQUIRE(oss.str() == "gappixels 0\n"); + } + REQUIRE_THROWS(proxy.Call("gappixels", {"1"}, -1, PUT)); } } @@ -1355,7 +1365,8 @@ TEST_CASE("tengiga", "[.cmd][.new]") { CmdProxy proxy(&det); auto det_type = det.getDetectorType().squash(); - if (det_type == defs::EIGER || det_type == defs::CHIPTESTBOARD) { + if (det_type == defs::EIGER || det_type == defs::CHIPTESTBOARD || + det_type == defs::MOENCH) { auto tengiga = det.getTenGiga(); det.setTenGiga(false);