mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-12-16 01:21:20 +01:00
fixed daclist setter
This commit is contained in:
@@ -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."""
|
||||
|
||||
@@ -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<size_t>(i);
|
||||
if (index > names.size())
|
||||
if (index >= names.size())
|
||||
throw RuntimeError("Dac index out of range");
|
||||
return names[index];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user