From add967483b9dcdab797f8a312797acd42c3321d3 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Fri, 8 Mar 2024 12:48:24 +0100 Subject: [PATCH] DetectorWrapper: InternalStop() should also stop detector if it is waiting for trigger --- detector_control/DetectorWrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detector_control/DetectorWrapper.cpp b/detector_control/DetectorWrapper.cpp index 264d29f8..c2f4af06 100644 --- a/detector_control/DetectorWrapper.cpp +++ b/detector_control/DetectorWrapper.cpp @@ -139,7 +139,7 @@ void DetectorWrapper::InternalStop() { auto state = GetState(); if (state == DetectorState::ERROR) throw JFJochException(JFJochExceptionCategory::Detector, "Detector in error state"); - else if (state == DetectorState::BUSY) { + else if ((state == DetectorState::BUSY) || (state == DetectorState::WAITING)) { try { det.stopDetector(); } catch (...) {