From 69cea7b2425b8c7eaa90581400c522af2d8f3f05 Mon Sep 17 00:00:00 2001 From: Oliver Silvester Date: Mon, 11 Nov 2024 13:23:17 +0000 Subject: [PATCH] Add asyncio sleep to async for loop --- src/dodal/devices/oav/pin_image_recognition/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dodal/devices/oav/pin_image_recognition/__init__.py b/src/dodal/devices/oav/pin_image_recognition/__init__.py index 31ebd0350a..8c2e1040fb 100644 --- a/src/dodal/devices/oav/pin_image_recognition/__init__.py +++ b/src/dodal/devices/oav/pin_image_recognition/__init__.py @@ -153,6 +153,7 @@ async def _set_triggered_tip(): """ async for value in observe_value(self.array_data): try: + await asyncio.sleep(0) location = await self._get_tip_and_edge_data(value) self._set_triggered_values(location) except Exception as e: