Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): ungrip gripper should home g #16933

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading