Skip to content

Commit 81c3563

Browse files
committed
dynamic timeout for luminescence reading on cytation
1 parent c28ab11 commit 81c3563

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pylabrobot/plate_reading/biotek_backend.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ async def setup(self, use_cam: bool = False) -> None:
124124
await self.io.set_flowctrl(SIO_RTS_CTS_HS)
125125
await self.io.set_rts(True)
126126

127+
await self._abort()
128+
127129
# see if we need to adjust baudrate. This appears to be the case sometimes.
128130
try:
129131
self._version = await self.get_firmware_version()
@@ -692,7 +694,10 @@ async def read_luminescence(
692694
resp = await self.send_command("O")
693695
assert resp == b"\x060000\x03"
694696

695-
body = await self._read_until(b"\x03", timeout=60 * 3)
697+
# 2m10s of reading per 1 second of integration time
698+
# allow 60 seconds flat
699+
timeout = 60 + integration_time_seconds * (2 * 60 + 10)
700+
body = await self._read_until(b"\x03", timeout=timeout)
696701
assert body is not None
697702
return self._parse_body(body)
698703

0 commit comments

Comments
 (0)