removed GET_ flags, replaced -1 with GET_FLAG

This commit is contained in:
2020-06-18 17:10:53 +02:00
parent 7c23f1e42c
commit 489fccb25c
5 changed files with 95 additions and 155 deletions

View File

@@ -1186,9 +1186,9 @@ std::string CmdProxy::Threshold(int action) {
os << OutString(t) << '\n';
} else if (action == defs::PUT_ACTION) {
if (args.size() == 1) {
det->setThresholdEnergy(StringTo<int>(args[0]),
slsDetectorDefs::GET_SETTINGS, true,
{det_id});
auto t = det->getSettings({det_id}).tsquash(
"Inconsistent settings between detectors");
det->setThresholdEnergy(StringTo<int>(args[0]), t, true, {det_id});
} else if (args.size() == 2) {
det->setThresholdEnergy(
StringTo<int>(args[0]),
@@ -1216,9 +1216,9 @@ std::string CmdProxy::ThresholdNoTb(int action) {
throw sls::RuntimeError("cannot get");
} else if (action == defs::PUT_ACTION) {
if (args.size() == 1) {
det->setThresholdEnergy(StringTo<int>(args[0]),
slsDetectorDefs::GET_SETTINGS, false,
{det_id});
auto t = det->getSettings({det_id}).tsquash(
"Inconsistent settings between detectors");
det->setThresholdEnergy(StringTo<int>(args[0]), t, false, {det_id});
} else if (args.size() == 2) {
det->setThresholdEnergy(
StringTo<int>(args[0]),