mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-08-08 05:32:25 +02:00
restream stop if stop called, temp solution (#1092)
* restream stop if stop called, temp solution until new command for it * chekckrestream is ambiguous when only checking receiver * moved restreaming in background to receiver stop instead of detector stop (was in stop before due to gui stop button access), increase to 2s time to restream in client acquire * minor * moved stop to module class * fix from before
This commit is contained in:
@@ -905,8 +905,13 @@ void Module::startReceiver() {
|
||||
}
|
||||
|
||||
void Module::stopReceiver() {
|
||||
auto rxStatusPrior = getReceiverStatus();
|
||||
sendToReceiver(F_STOP_RECEIVER, static_cast<int>(shm()->stoppedFlag),
|
||||
nullptr);
|
||||
|
||||
if (rxStatusPrior == IDLE && getReceiverStreaming()) {
|
||||
restreamStopFromReceiver();
|
||||
}
|
||||
}
|
||||
|
||||
void Module::startAcquisition() {
|
||||
@@ -920,26 +925,8 @@ void Module::startReadout() {
|
||||
}
|
||||
|
||||
void Module::stopAcquisition() {
|
||||
|
||||
// get det status before stopping acq
|
||||
runStatus detStatus = ERROR;
|
||||
try {
|
||||
detStatus = getRunStatus();
|
||||
} catch (...) {
|
||||
}
|
||||
|
||||
sendToDetectorStop(F_STOP_ACQUISITION);
|
||||
shm()->stoppedFlag = true;
|
||||
|
||||
// restream dummy header, if rxr streaming and det idle before stop
|
||||
try {
|
||||
if (shm()->useReceiverFlag && getReceiverStreaming()) {
|
||||
if (detStatus == IDLE && getReceiverStatus() == IDLE) {
|
||||
restreamStopFromReceiver();
|
||||
}
|
||||
}
|
||||
} catch (...) {
|
||||
}
|
||||
}
|
||||
|
||||
void Module::restreamStopFromReceiver() {
|
||||
|
||||
Reference in New Issue
Block a user