From 60a3ed02ea46029ad5448d9c90ffcbb34d17fde8 Mon Sep 17 00:00:00 2001 From: appel_c Date: Fri, 27 Feb 2026 14:11:26 +0100 Subject: [PATCH] w --- csaxs_bec/devices/panda_box/panda_box_omny.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/csaxs_bec/devices/panda_box/panda_box_omny.py b/csaxs_bec/devices/panda_box/panda_box_omny.py index 255c4f1..e48f4c2 100644 --- a/csaxs_bec/devices/panda_box/panda_box_omny.py +++ b/csaxs_bec/devices/panda_box/panda_box_omny.py @@ -31,6 +31,7 @@ class PandaBoxOMNY(PandaBox): def on_complete(self): """On complete is called after the scan is complete. We need to wait for the capture to complete before we can disarm the PandaBox.""" + status = super().on_complete() def _check_capture_complete(): captured = 0 @@ -56,6 +57,9 @@ class PandaBoxOMNY(PandaBox): _check_capture_complete() + if status is not None: + status.wait(timeout=self._timeout_on_completed) + # NOTE: This utility class allows to submit a blocking function to a thread and return a status object # that can be awaited for. This allows for asynchronous waiting for the capture to complete without blocking # the main duty cycle of the device server. The device server knows how to handle the status object (future)