mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-16 23:07:13 +02:00
M3: master starts twice (non blocking) (#444)
* start acq for master m3 was sent twice (non blocking), removed redundant code, check that there is only one master * m3 can have more than 1 master (when many master modules used independently) * fix for singe mod m3 or other dets
This commit is contained in:
@ -781,24 +781,7 @@ void Detector::startReceiver() { pimpl->Parallel(&Module::startReceiver, {}); }
|
||||
void Detector::stopReceiver() { pimpl->Parallel(&Module::stopReceiver, {}); }
|
||||
|
||||
void Detector::startDetector(Positions pos) {
|
||||
auto detector_type = getDetectorType(pos).squash();
|
||||
if (detector_type == defs::MYTHEN3 && size() > 1) {
|
||||
std::vector<int> slaves(pos);
|
||||
auto is_master = getMaster(pos);
|
||||
int masterPosition = -1;
|
||||
for (unsigned int i = 0; i < is_master.size(); ++i) {
|
||||
if (is_master[i]) {
|
||||
masterPosition = i;
|
||||
slaves.erase(slaves.begin() + i);
|
||||
}
|
||||
}
|
||||
pimpl->Parallel(&Module::startAcquisition, pos);
|
||||
if (masterPosition != -1) {
|
||||
pimpl->Parallel(&Module::startAcquisition, {masterPosition});
|
||||
}
|
||||
} else {
|
||||
pimpl->Parallel(&Module::startAcquisition, pos);
|
||||
}
|
||||
pimpl->startAcquisition(false, pos);
|
||||
}
|
||||
|
||||
void Detector::startDetectorReadout() {
|
||||
|
Reference in New Issue
Block a user