mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-27 16:50:02 +02:00
bug fix from 4.0.2: powerchip multi should have delays, burst trigger added to users
This commit is contained in:
parent
55229f77a3
commit
359970dfc2
@ -927,7 +927,7 @@ public:
|
||||
/**
|
||||
@short returns external communication mode std::string from index
|
||||
\param s index for communication mode
|
||||
\returns auto, trigger, ro_trigger, gating, triggered_gating, unknown when wrong mode
|
||||
\returns auto, trigger, ro_trigger, gating, triggered_gating, burst_trigger, unknown when wrong mode
|
||||
*/
|
||||
|
||||
static int getTimingMode(std::string s){ \
|
||||
@ -936,6 +936,7 @@ public:
|
||||
if (s== "ro_trigger") return 2; \
|
||||
if (s== "gating") return 3; \
|
||||
if (s== "triggered_gating") return 4; \
|
||||
if (s== "burst_trigger") return 5; \
|
||||
return -1; };
|
||||
|
||||
|
||||
|
@ -2811,7 +2811,17 @@ int multiSlsDetector::powerChip(int ival, int detPos) {
|
||||
return detectors[detPos]->powerChip(ival);
|
||||
}
|
||||
|
||||
// multi
|
||||
// multi delayed call for safety
|
||||
if (ival >= 0 && getNumberOfDetectors() > 3) {
|
||||
std::vector<int> r;
|
||||
r.reserve(detectors.size());
|
||||
for (auto &d : detectors) {
|
||||
r.push_back(d->powerChip(ival));
|
||||
usleep(1000 * 1000);
|
||||
}
|
||||
return sls::minusOneIfDifferent(r);
|
||||
}
|
||||
// multi parallel
|
||||
auto r = parallelCall(&slsDetector::powerChip, ival);
|
||||
return sls::minusOneIfDifferent(r);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user