mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-22 08:35:27 +01:00
WIP
This commit is contained in:
@@ -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<int, 4> 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
|
||||
|
||||
Reference in New Issue
Block a user