diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py index 25715e61a..d94d82995 100755 --- a/python/slsdet/detector.py +++ b/python/slsdet/detector.py @@ -1578,6 +1578,10 @@ class Detector(CppDetectorApi): """ return self.getDacNames() + @daclist.setter + def daclist(self, value): + self.setDacNames(value) + @property def dacvalues(self): """Gets the dac values for every dac for this detector.""" diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index 8ad11ce82..5e9966860 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -2104,7 +2104,7 @@ defs::dacIndex Detector::decodeNamedDac(const std::string &name) { std::string Detector::decodeNamedDac(defs::dacIndex i) { auto names = getDacNames(); auto index = static_cast(i); - if (index > names.size()) + if (index >= names.size()) throw RuntimeError("Dac index out of range"); return names[index]; }