Skip to content

Commit

Permalink
fix(api): fix left mount being disengaged when moving to maintenance …
Browse files Browse the repository at this point in the history
…position (#14341)

* RQA-2235 if z_L is disengaged before moving to maintenance pos, home z_l
  • Loading branch information
ahiuchingau authored and ncdiehl11 committed Feb 1, 2024
1 parent ee944e2 commit 53b8705
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,12 @@ def _assert_encoder_ok(self, axes: Sequence[Axis]) -> None:
detail={"axes": axes_str},
)

def motor_status_ok(self, axis: Axis) -> bool:
return self._backend.check_motor_status([axis])

def encoder_status_ok(self, axis: Axis) -> bool:
return self._backend.check_encoder_status([axis])

async def encoder_current_position(
self,
mount: Union[top_types.Mount, OT3Mount],
Expand Down
8 changes: 8 additions & 0 deletions api/src/opentrons/hardware_control/protocols/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""Typing protocols describing a hardware controller."""
from typing_extensions import Protocol, Type

from opentrons.hardware_control.types import Axis

from .module_provider import ModuleProvider
from .hardware_manager import HardwareManager
from .chassis_accessory_manager import ChassisAccessoryManager
Expand Down Expand Up @@ -82,6 +84,12 @@ class FlexHardwareControlInterface(
def get_robot_type(self) -> Type[FlexRobotType]:
return FlexRobotType

def motor_status_ok(self, axis: Axis) -> bool:
...

def encoder_status_ok(self, axis: Axis) -> bool:
...


__all__ = [
"HardwareControlAPI",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ async def execute(
ot3_api = ensure_ot3_hardware(
self._hardware_api,
)
# the 96-channel mount is disengaged during gripper calibration and
# must be homed before the gantry position can be called
if ot3_api.encoder_status_ok(Axis.Z_L) and not ot3_api.motor_status_ok(
Axis.Z_L
):
await ot3_api.home([Axis.Z_L])
current_position_mount = await ot3_api.gantry_position(
Mount.LEFT, critical_point=CriticalPoint.MOUNT
)
Expand Down

0 comments on commit 53b8705

Please sign in to comment.