Skip to content

Commit

Permalink
refactor(api): only ignore stalls for downward portion of force picku…
Browse files Browse the repository at this point in the history
…p routine (#14725)
  • Loading branch information
caila-marashaj authored Apr 16, 2024
1 parent 4abe652 commit 35e9fe7
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2093,14 +2093,17 @@ async def _force_pick_up_tip(
) -> None:
for press in pipette_spec.tip_action_moves:
async with self._backend.motor_current(run_currents=press.currents):
target_down = target_position_from_relative(
target = target_position_from_relative(
mount, top_types.Point(z=press.distance), self._current_position
)
await self._move(target_down, speed=press.speed, expect_stalls=True)
if press.distance < 0:
# we expect a stall has happened during a downward movement into the tiprack, so
# we want to update the motor estimation
await self._update_position_estimation([Axis.by_mount(mount)])
if press.distance < 0:
# we expect a stall has happened during a downward movement into the tiprack, so
# we want to update the motor estimation
await self._move(target, speed=press.speed, expect_stalls=True)
await self._update_position_estimation([Axis.by_mount(mount)])
else:
# we should not ignore stalls that happen during the retract part of the routine
await self._move(target, speed=press.speed, expect_stalls=False)

async def _tip_motor_action(
self, mount: OT3Mount, pipette_spec: List[TipActionMoveSpec]
Expand Down

0 comments on commit 35e9fe7

Please sign in to comment.