mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 11:20:04 +02:00
7.0.3.rc: gui acq finished callback for different status (#847)
* fix acquisition finished status to have different status for different modules, but does not have to be error. for eg. jf sync fw (2.4.1 gives idle for master and stopped for slaves when stopping acquiistion)
This commit is contained in:
parent
82edfa75d3
commit
58ac7ac280
@ -1234,10 +1234,26 @@ int DetectorImpl::acquire() {
|
||||
dataProcessingThread.join();
|
||||
|
||||
if (acquisition_finished != nullptr) {
|
||||
int status = Parallel(&Module::getRunStatus, {}).squash(ERROR);
|
||||
// status
|
||||
runStatus status = IDLE;
|
||||
auto statusList = Parallel(&Module::getRunStatus, {});
|
||||
status = statusList.squash(ERROR);
|
||||
// difference, but none error
|
||||
if (status == ERROR && (!statusList.any(ERROR))) {
|
||||
// handle jf sync issue (master idle, slaves stopped)
|
||||
if (statusList.contains_only(IDLE, STOPPED)) {
|
||||
status = STOPPED;
|
||||
}
|
||||
else
|
||||
status = statusList.squash(RUNNING);
|
||||
}
|
||||
|
||||
// progress
|
||||
auto a = Parallel(&Module::getReceiverProgress, {});
|
||||
double progress = (*std::max_element(a.begin(), a.end()));
|
||||
acquisition_finished(progress, status, acqFinished_p);
|
||||
|
||||
// callback
|
||||
acquisition_finished(progress, static_cast<int>(status), acqFinished_p);
|
||||
}
|
||||
|
||||
clock_gettime(CLOCK_REALTIME, &end);
|
||||
|
Loading…
x
Reference in New Issue
Block a user