Skip to content

Commit

Permalink
return if no tip
Browse files Browse the repository at this point in the history
  • Loading branch information
caila-marashaj committed May 23, 2024
1 parent ed99607 commit 141dcbd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 (
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 141dcbd

Please sign in to comment.