mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 11:20:04 +02:00
fixes for tests for m3
This commit is contained in:
parent
13bbd54a21
commit
a098bc4674
@ -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)
|
||||
|
||||
|
@ -1476,8 +1476,9 @@ class Detector {
|
||||
Result<int> 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 = {});
|
||||
|
||||
|
@ -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."
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user