Skip to content

Commit

Permalink
only add tip if pickup successful
Browse files Browse the repository at this point in the history
  • Loading branch information
caila-marashaj committed May 9, 2024
1 parent 696aa4c commit fdb05cd
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2153,11 +2153,16 @@ async def pick_up_tip(
realmount = OT3Mount.from_mount(mount)
instrument = self._pipette_handler.get_pipette(realmount)

def add_tip_to_instr() -> None:
instrument.add_tip(tip_length=tip_length)
instrument.set_current_volume(0)
async def add_tip_to_instr() -> None:
if isinstance(self._backend, OT3Simulator):
instrument.add_tip(tip_length=tip_length)
instrument.set_current_volume(0)
self._backend._update_tip_state(realmount, True)
else:
status = await self.get_tip_presence_status(mount, InstrumentProbeType.PRIMARY)
if status == TipStateType.PRESENT:
instrument.add_tip(tip_length=tip_length)
instrument.set_current_volume(0)

await self._move_to_plunger_bottom(realmount, rate=1.0)
if (
Expand Down Expand Up @@ -2195,7 +2200,7 @@ def add_tip_to_instr() -> None:
realmount, top_types.Point(z=spec.ending_z_retract_distance)
)

add_tip_to_instr()
await add_tip_to_instr()

if prep_after:
await self.prepare_for_aspirate(realmount)
Expand Down

0 comments on commit fdb05cd

Please sign in to comment.