This commit is contained in:
maliakal_d 2021-08-06 08:18:34 +02:00
parent 57534fcbee
commit 42257d8f67
2 changed files with 13 additions and 4 deletions

View File

@ -1199,6 +1199,13 @@ class Detector {
*/
void setGainMode(const defs::gainMode mode, Positions pos = {});
/** [Jungfrau] Advanced */
Result<int> getFilterCell(Positions pos = {}) const;
/** [Jungfrau] Advanced Options[0-12]
*/
void setFilterCell(int cell, Positions pos = {});
///@{
/** @name Gotthard Specific */

View File

@ -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 {