Skip to content

Commit f764319

Browse files
fix(api): ungrip gripper should home g (#16933)
1 parent d8ad367 commit f764319

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

api/src/opentrons/protocol_engine/commands/unsafe/unsafe_ungrip_labware.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""Ungrip labware payload, result, and implementaiton."""
22

33
from __future__ import annotations
4+
5+
from opentrons.hardware_control.types import Axis
46
from opentrons.protocol_engine.errors.exceptions import GripperNotAttachedError
57
from pydantic import BaseModel
68
from typing import Optional, Type
@@ -46,7 +48,7 @@ async def execute(
4648
ot3_hardware_api = ensure_ot3_hardware(self._hardware_api)
4749
if not ot3_hardware_api.has_gripper():
4850
raise GripperNotAttachedError("No gripper found to perform ungrip.")
49-
await ot3_hardware_api.ungrip()
51+
await ot3_hardware_api.home([Axis.G])
5052
return SuccessData(
5153
public=UnsafeUngripLabwareResult(),
5254
)

api/tests/opentrons/protocol_engine/commands/unsafe/test_ungrip_labware.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Test update-position-estimator commands."""
22
from decoy import Decoy
33

4+
from opentrons.hardware_control.types import Axis
45
from opentrons.protocol_engine.commands.unsafe.unsafe_ungrip_labware import (
56
UnsafeUngripLabwareParams,
67
UnsafeUngripLabwareResult,
@@ -25,7 +26,7 @@ async def test_ungrip_labware_implementation(
2526
assert result == SuccessData(public=UnsafeUngripLabwareResult())
2627

2728
decoy.verify(
28-
await ot3_hardware_api.ungrip(),
29+
await ot3_hardware_api.home([Axis.G]),
2930
)
3031

3132

app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryCommands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ export const HOME_PIPETTE_Z_AXES: CreateCommand = {
355355
}
356356

357357
export const RELEASE_GRIPPER_JAW: CreateCommand = {
358-
commandType: 'home',
359-
params: { axes: ['extensionJaw'] },
358+
commandType: 'unsafe/ungripLabware',
359+
params: {},
360360
intent: 'fixit',
361361
}
362362

0 commit comments

Comments
 (0)