mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 16: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 {
|
||||
|
@ -513,6 +513,7 @@ bool Module::isMaster() const { return sendToDetectorStop<int>(F_GET_MASTER); }
|
||||
|
||||
void Module::setMaster(const bool master) {
|
||||
sendToDetector(F_SET_MASTER, static_cast<int>(master), nullptr);
|
||||
sendToDetectorStop(F_SET_MASTER, static_cast<int>(master), nullptr);
|
||||
}
|
||||
|
||||
bool Module::isVirtualDetectorServer() const {
|
||||
@ -1680,12 +1681,11 @@ void Module::setDataStream(const portPosition port, const bool enable) {
|
||||
}
|
||||
|
||||
bool Module::getTop() const {
|
||||
return (
|
||||
!static_cast<bool>(sendToDetector<int>(F_GET_TOP)));
|
||||
return (static_cast<bool>(sendToDetector<int>(F_GET_TOP)));
|
||||
}
|
||||
|
||||
void Module::setTop(bool value) {
|
||||
sendToDetector<int>(F_SET_TOP, static_cast<int>(value));
|
||||
sendToDetector(F_SET_TOP, static_cast<int>(value), nullptr);
|
||||
}
|
||||
|
||||
// Jungfrau Specific
|
||||
|
Reference in New Issue
Block a user