mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 19:30:03 +02:00
M3vtrim min (#454)
* Remove the vtrim min 600 check when setting threshold energy. vth1-3:200 - 2400, others 0-2800 * compile fix
This commit is contained in:
parent
b122c2fbdf
commit
88649a00b6
@ -407,12 +407,18 @@ void Module::setAllThresholdEnergy(std::array<int, 3> e_eV,
|
|||||||
|
|
||||||
// check dacs
|
// check dacs
|
||||||
out_of_range = false;
|
out_of_range = false;
|
||||||
for (auto dac : {M_VTRIM, M_VTH1, M_VTH2, M_VTH3}) {
|
for (int i = 0; i != myMod.ndac; ++i) {
|
||||||
if (myMod.dacs[dac] < 600) {
|
int dacMin = 0;
|
||||||
myMod.dacs[dac] = 600;
|
int dacMax = 2800;
|
||||||
|
if (i == M_VTH1 || i == M_VTH2 || i == M_VTH3) {
|
||||||
|
dacMin = 200;
|
||||||
|
dacMax = 2400;
|
||||||
|
}
|
||||||
|
if (myMod.dacs[i] < dacMin) {
|
||||||
|
myMod.dacs[i] = dacMin;
|
||||||
out_of_range = true;
|
out_of_range = true;
|
||||||
} else if (myMod.dacs[dac] > 2400) {
|
} else if (myMod.dacs[i] > dacMax) {
|
||||||
myMod.dacs[dac] = 2400;
|
myMod.dacs[i] = dacMax;
|
||||||
out_of_range = true;
|
out_of_range = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user