Skip to content

Commit

Permalink
fix(api): ungrip gripper should home g (#16933)
Browse files Browse the repository at this point in the history
  • Loading branch information
TamarZanzouri authored Nov 21, 2024
1 parent d8ad367 commit f764319
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""Ungrip labware payload, result, and implementaiton."""

from __future__ import annotations

from opentrons.hardware_control.types import Axis
from opentrons.protocol_engine.errors.exceptions import GripperNotAttachedError
from pydantic import BaseModel
from typing import Optional, Type
Expand Down Expand Up @@ -46,7 +48,7 @@ async def execute(
ot3_hardware_api = ensure_ot3_hardware(self._hardware_api)
if not ot3_hardware_api.has_gripper():
raise GripperNotAttachedError("No gripper found to perform ungrip.")
await ot3_hardware_api.ungrip()
await ot3_hardware_api.home([Axis.G])
return SuccessData(
public=UnsafeUngripLabwareResult(),
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test update-position-estimator commands."""
from decoy import Decoy

from opentrons.hardware_control.types import Axis
from opentrons.protocol_engine.commands.unsafe.unsafe_ungrip_labware import (
UnsafeUngripLabwareParams,
UnsafeUngripLabwareResult,
Expand All @@ -25,7 +26,7 @@ async def test_ungrip_labware_implementation(
assert result == SuccessData(public=UnsafeUngripLabwareResult())

decoy.verify(
await ot3_hardware_api.ungrip(),
await ot3_hardware_api.home([Axis.G]),
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ export const HOME_PIPETTE_Z_AXES: CreateCommand = {
}

export const RELEASE_GRIPPER_JAW: CreateCommand = {
commandType: 'home',
params: { axes: ['extensionJaw'] },
commandType: 'unsafe/ungripLabware',
params: {},
intent: 'fixit',
}

Expand Down

0 comments on commit f764319

Please sign in to comment.