From a7d43bb289bd605274dcd399affcec2e6381c653 Mon Sep 17 00:00:00 2001 From: caila-marashaj Date: Thu, 21 Nov 2024 14:39:34 -0500 Subject: [PATCH] add highSpeed quirk --- .../hardware_control/instruments/ot3/pipette.py | 4 ++++ api/src/opentrons/hardware_control/ot3api.py | 9 +++------ .../2/general/eight_channel_em/p1000/3_0.json | 2 +- .../python/opentrons_shared_data/pipette/types.py | 1 + 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/api/src/opentrons/hardware_control/instruments/ot3/pipette.py b/api/src/opentrons/hardware_control/instruments/ot3/pipette.py index 5a4d9261bfd4..b93558749063 100644 --- a/api/src/opentrons/hardware_control/instruments/ot3/pipette.py +++ b/api/src/opentrons/hardware_control/instruments/ot3/pipette.py @@ -41,6 +41,7 @@ UlPerMmAction, PipetteName, PipetteModel, + Quirks, ) from opentrons_shared_data.pipette import ( load_data as load_pipette_data, @@ -225,6 +226,9 @@ def active_tip_settings(self) -> SupportedTipsDefinition: def push_out_volume(self) -> float: return self._active_tip_settings.default_push_out_volume + def is_high_speed_pipette(self) -> bool: + return Quirks.highSpeed in self._config.quirks + def act_as(self, name: PipetteName) -> None: """Reconfigure to act as ``name``. ``name`` must be either the actual name of the pipette, or a name in its back-compatibility diff --git a/api/src/opentrons/hardware_control/ot3api.py b/api/src/opentrons/hardware_control/ot3api.py index ec19e2f331db..29fd3ed6866c 100644 --- a/api/src/opentrons/hardware_control/ot3api.py +++ b/api/src/opentrons/hardware_control/ot3api.py @@ -32,7 +32,6 @@ ) from opentrons_shared_data.pipette import ( pipette_load_name_conversions as pipette_load_name, - pipette_definition, ) from opentrons_shared_data.robot.types import RobotType @@ -635,8 +634,8 @@ async def cache_pipette( self._feature_flags.use_old_aspiration_functions, ) self._pipette_handler.hardware_instruments[mount] = p - if config is not None: - self._confirm_pipette_motion_constraints(mount, instrument_config=config) + if not self.is_simulator: + self._confirm_pipette_motion_constraints(mount) # TODO (lc 12-5-2022) Properly support backwards compatibility # when applicable return skipped @@ -644,10 +643,8 @@ async def cache_pipette( def _confirm_pipette_motion_constraints( self, mount: OT3Mount, - instrument_config: pipette_definition.PipetteConfigurations, ) -> None: - display_name = instrument_config.display_name - if display_name == "FLEX 8-Channel Emulsifying 1000 μL": + if self._pipette_handler.get_pipette(mount).is_high_speed_pipette(): self._backend.update_constraints_for_emulsifying_pipette( mount, self.gantry_load ) diff --git a/shared-data/pipette/definitions/2/general/eight_channel_em/p1000/3_0.json b/shared-data/pipette/definitions/2/general/eight_channel_em/p1000/3_0.json index c49ae20d87a4..c267504b404b 100644 --- a/shared-data/pipette/definitions/2/general/eight_channel_em/p1000/3_0.json +++ b/shared-data/pipette/definitions/2/general/eight_channel_em/p1000/3_0.json @@ -312,7 +312,7 @@ "shaftDiameter": 4.5, "shaftULperMM": 15.904, "backlashDistance": 0.1, - "quirks": [], + "quirks": ["highSpeed"], "plungerHomingConfigurations": { "current": 1.0, "speed": 30 diff --git a/shared-data/python/opentrons_shared_data/pipette/types.py b/shared-data/python/opentrons_shared_data/pipette/types.py index d5315ec12d5d..c52e57eb20e0 100644 --- a/shared-data/python/opentrons_shared_data/pipette/types.py +++ b/shared-data/python/opentrons_shared_data/pipette/types.py @@ -109,6 +109,7 @@ class Quirks(enum.Enum): dropTipShake = "dropTipShake" doubleDropTip = "doubleDropTip" needsUnstick = "needsUnstick" + highSpeed = "highSpeed" class AvailableUnits(enum.Enum):