From a8e4c01907c8d6a0e0dde5f5499d5580dc528e03 Mon Sep 17 00:00:00 2001 From: Sakari Kapanen Date: Wed, 27 Mar 2019 15:08:49 +0200 Subject: Camera: allow specifying timeout in acquire_frame() --- pymba/camera.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymba/camera.py b/pymba/camera.py index 3df3ebc..f9abdb3 100644 --- a/pymba/camera.py +++ b/pymba/camera.py @@ -221,7 +221,7 @@ class Camera(VimbaObject): self.start_capture() - def acquire_frame(self) -> Frame: + def acquire_frame(self, timeout_ms: Optional[int] = 2000) -> Frame: """ Acquire and return a single frame when the camera is armed in 'SingleFrame' acquisition mode. Can be called multiple times in a row, but don't call again until the frame has been @@ -233,7 +233,7 @@ class Camera(VimbaObject): # capture a single frame self._single_frame.queue_for_capture() self.AcquisitionStart() - self._single_frame.wait_for_capture() + self._single_frame.wait_for_capture(timeout_ms=timeout_ms) self.AcquisitionStop() return self._single_frame -- cgit v1.2.3