mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
fixed daclist setter
This commit is contained in:
@ -1578,6 +1578,10 @@ class Detector(CppDetectorApi):
|
|||||||
"""
|
"""
|
||||||
return self.getDacNames()
|
return self.getDacNames()
|
||||||
|
|
||||||
|
@daclist.setter
|
||||||
|
def daclist(self, value):
|
||||||
|
self.setDacNames(value)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def dacvalues(self):
|
def dacvalues(self):
|
||||||
"""Gets the dac values for every dac for this detector."""
|
"""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) {
|
std::string Detector::decodeNamedDac(defs::dacIndex i) {
|
||||||
auto names = getDacNames();
|
auto names = getDacNames();
|
||||||
auto index = static_cast<size_t>(i);
|
auto index = static_cast<size_t>(i);
|
||||||
if (index > names.size())
|
if (index >= names.size())
|
||||||
throw RuntimeError("Dac index out of range");
|
throw RuntimeError("Dac index out of range");
|
||||||
return names[index];
|
return names[index];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user