From ec181c6d566d8301cbbf495c2050045cc40a7a55 Mon Sep 17 00:00:00 2001 From: ahiuchingau <20424172+ahiuchingau@users.noreply.github.com> Date: Fri, 26 Apr 2024 17:19:35 -0400 Subject: [PATCH] pass the calibrated jaw max offset value when we reset the gripper --- .../opentrons/hardware_control/instruments/ot3/gripper.py | 6 +++++- .../hardware_control/instruments/ot3/gripper_handler.py | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/api/src/opentrons/hardware_control/instruments/ot3/gripper.py b/api/src/opentrons/hardware_control/instruments/ot3/gripper.py index 3f120f972a6..db34501da08 100644 --- a/api/src/opentrons/hardware_control/instruments/ot3/gripper.py +++ b/api/src/opentrons/hardware_control/instruments/ot3/gripper.py @@ -52,6 +52,7 @@ def __init__( config: GripperDefinition, gripper_cal_offset: GripperCalibrationOffset, gripper_id: str, + jaw_max_offset: Optional[float] = None, ) -> None: self._config = config self._model = config.model @@ -83,7 +84,7 @@ def __init__( self._log.info( f"loaded: {self._model}, gripper offset: {self._calibration_offset}" ) - self._jaw_max_offset: Optional[float] = None + self._jaw_max_offset = jaw_max_offset @property def grip_force_profile(self) -> GripForceProfile: @@ -330,6 +331,9 @@ def _reload_gripper( new_config, cal_offset, attached_instr._gripper_id, + attached_instr._jaw_max_offset + if attached_instr.has_jaw_width_calibration + else None, ), False, ) diff --git a/api/src/opentrons/hardware_control/instruments/ot3/gripper_handler.py b/api/src/opentrons/hardware_control/instruments/ot3/gripper_handler.py index cf2ba55e23d..ad0c442e44c 100644 --- a/api/src/opentrons/hardware_control/instruments/ot3/gripper_handler.py +++ b/api/src/opentrons/hardware_control/instruments/ot3/gripper_handler.py @@ -51,6 +51,9 @@ def reset_gripper(self) -> None: og_gripper.config, load_gripper_calibration_offset(og_gripper.gripper_id), og_gripper.gripper_id, + og_gripper._jaw_max_offset + if og_gripper.has_jaw_width_calibration + else None, ) self._gripper = new_gripper