mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-17 15:27:13 +02:00
fixes for set top, masterin api
This commit is contained in:
@ -303,11 +303,11 @@ Result<bool> Detector::getMaster(Positions pos) const {
|
||||
}
|
||||
|
||||
void Detector::setMaster(bool master, int pos) {
|
||||
if (pos == -1 && size() > 1) {
|
||||
throw RuntimeError("Master can be set only to a single module");
|
||||
}
|
||||
// multi mod, set slaves first
|
||||
if (master && size() > 1) {
|
||||
if (pos == -1) {
|
||||
throw RuntimeError("Master can be set only to a single module");
|
||||
}
|
||||
pimpl->Parallel(&Module::setMaster, {}, false);
|
||||
pimpl->Parallel(&Module::setMaster, {pos}, master);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user