mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-07 23:38:40 +01: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