From 7c5d39812e0d3b7e5d2a86947d81847ca8852d25 Mon Sep 17 00:00:00 2001 From: Camillo Moschner Date: Mon, 27 Apr 2026 13:32:24 +0100 Subject: [PATCH] STARPIPChannel.request_x_pos: delegate to left_x_arm (C0 RX), was sending invalid C0 RA pn= --- .../hamilton/liquid_handlers/star/pip_channel.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pylabrobot/hamilton/liquid_handlers/star/pip_channel.py b/pylabrobot/hamilton/liquid_handlers/star/pip_channel.py index 97834b614c5..70820fb1eb4 100644 --- a/pylabrobot/hamilton/liquid_handlers/star/pip_channel.py +++ b/pylabrobot/hamilton/liquid_handlers/star/pip_channel.py @@ -334,20 +334,17 @@ async def move_tool_z(self, z: float): zj=f"{round(z * 10):04}", ) - # -- C0:RA request X position ------------------------------------------------ - + # -- delegate to left_x_arm (C0 RX) — channels share the X carriage ---------- + # TODO: we assume `C0RX` references the center of the x-arm, figure out what it + # references for half-arms (see issue 822 and new Fluid Motion STAR) + async def request_x_pos(self) -> float: """Request current X-position of this channel (mm). All PIP channels share the same X arm, so this returns the arm position. """ - resp = await self.driver.send_command( - module="C0", - command="RA", - fmt="ra#####", - pn=f"{self.index + 1:02}", - ) - return float(resp["ra"] / 10) + assert self.driver.left_x_arm is not None, "left_x_arm not set; call driver.setup() first" + return await self.driver.left_x_arm.request_position() # -- C0:RB request Y position ------------------------------------------------