From 141dcbdc1f8d2ef5c1ddc7470e3a89d57b6d9972 Mon Sep 17 00:00:00 2001 From: caila-marashaj Date: Thu, 23 May 2024 14:41:21 -0400 Subject: [PATCH] return if no tip --- api/src/opentrons/hardware_control/ot3api.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/src/opentrons/hardware_control/ot3api.py b/api/src/opentrons/hardware_control/ot3api.py index 18f5f6237ee..b0706538f62 100644 --- a/api/src/opentrons/hardware_control/ot3api.py +++ b/api/src/opentrons/hardware_control/ot3api.py @@ -2153,7 +2153,7 @@ async def pick_up_tip( realmount = OT3Mount.from_mount(mount) instrument = self._pipette_handler.get_pipette(realmount) - async def add_tip_to_instr() -> None: + async def add_tip_to_instr() -> bool: if isinstance(self._backend, OT3Simulator): instrument.add_tip(tip_length=tip_length) instrument.set_current_volume(0) @@ -2165,6 +2165,9 @@ async def add_tip_to_instr() -> None: if status == TipStateType.PRESENT: instrument.add_tip(tip_length=tip_length) instrument.set_current_volume(0) + return True + else: + return False await self._move_to_plunger_bottom(realmount, rate=1.0) if ( @@ -2202,7 +2205,8 @@ async def add_tip_to_instr() -> None: realmount, top_types.Point(z=spec.ending_z_retract_distance) ) - await add_tip_to_instr() + if not await add_tip_to_instr(): + return if prep_after: await self.prepare_for_aspirate(realmount)