Skip to content

Commit

Permalink
v0.15.3
Browse files Browse the repository at this point in the history
version 0.15.3
  • Loading branch information
thusser authored Jan 7, 2022
2 parents 0ba612f + 1e6a9fb commit 25d6a1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions pyobs_aravis/araviscamera.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,20 @@ async def _capture(self) -> None:
await asyncio.sleep(0.1)
continue

# read frame
while True:
frame: npt.NDArray[float] = self._camera.pop_frame() # type: ignore
if frame is None:
await asyncio.sleep(0.01)
else:
break

# if time since last image is too short, wait a little
if time.time() - last < self._interval:
await asyncio.sleep(0.01)
continue

# read frame
frame: npt.NDArray[float] = self._camera.pop_frame() # type: ignore
# save time
last = time.time()

# process it
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyobs-aravis"
version = "0.15.2"
version = "0.15.3"
description = "pyobs module for Aravis cameras"
authors = ["Tim-Oliver Husser <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 25d6a1f

Please sign in to comment.