We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e3cace commit 98865bbCopy full SHA for 98865bb
pylabrobot/heating_shaking/hamilton.py
@@ -54,14 +54,11 @@ def serialize(self) -> dict:
54
55
async def _send_command(self, command: str, **kwargs):
56
assert len(command) == 2, "Command must be 2 characters long"
57
- args = "".join([f"{key}{value}" for key, value in kwargs.items()])
58
59
- # Run blocking I/O in a separate thread
+ args = "".join([f"{key}{value}" for key, value in kwargs.items()])
60
await asyncio.to_thread(self.io.write, f"T{self.shaker_index}{command}id{str(self.command_id).zfill(4)}{args}".encode())
61
62
self.command_id = (self.command_id + 1) % 10_000
63
-
64
- # Read response asynchronously
65
response = await asyncio.to_thread(self.io.read)
66
return response
67
0 commit comments