diff --git a/api/src/opentrons/protocol_api/core/engine/robot.py b/api/src/opentrons/protocol_api/core/engine/robot.py index 7deabff0571..477f1968c5a 100644 --- a/api/src/opentrons/protocol_api/core/engine/robot.py +++ b/api/src/opentrons/protocol_api/core/engine/robot.py @@ -17,7 +17,7 @@ AxisType.Z_R: MotorAxis.RIGHT_Z, AxisType.Z_G: MotorAxis.EXTENSION_Z, AxisType.G: MotorAxis.EXTENSION_JAW, - AxisType.Q: MotorAxis.CLAMP_JAW_96_CHANNEL, + AxisType.Q: MotorAxis.AXIS_96_CHANNEL_CAM, } diff --git a/api/src/opentrons/protocol_api/validation.py b/api/src/opentrons/protocol_api/validation.py index 6b491d7e9b4..1f8fb4bd8c8 100644 --- a/api/src/opentrons/protocol_api/validation.py +++ b/api/src/opentrons/protocol_api/validation.py @@ -260,9 +260,9 @@ def ensure_only_gantry_axis_map_type( f"A critical point only accepts OT-2 gantry axes which are {AxisType.ot2_gantry_axes()}" ) else: - if any(k not in AxisType.ot3_gantry_axes() for k in axis_map.keys()): + if any(k not in AxisType.flex_gantry_axes() for k in axis_map.keys()): raise IncorrectAxisError( - f"A critical point only accepts Flex gantry axes which are {AxisType.ot3_gantry_axes()}" + f"A critical point only accepts Flex gantry axes which are {AxisType.flex_gantry_axes()}" ) diff --git a/api/src/opentrons/protocol_engine/execution/gantry_mover.py b/api/src/opentrons/protocol_engine/execution/gantry_mover.py index 05680ca46b9..7306bc4e4d1 100644 --- a/api/src/opentrons/protocol_engine/execution/gantry_mover.py +++ b/api/src/opentrons/protocol_engine/execution/gantry_mover.py @@ -74,6 +74,8 @@ # That OT3Simulator return value is what Protocol Engine uses for simulation when Protocol Engine # is configured to not virtualize pipettes, so this number should match it. VIRTUAL_MAX_OT3_HEIGHT = 248.0 +# This number was found by using the longest pipette's P1000V2 default configuration values. +VIRTUAL_MAX_OT2_HEIGHT = 268.14 class GantryMover(TypingProtocol): @@ -544,8 +546,10 @@ def get_max_travel_z_from_mount(self, mount: MountType) -> float: """Get the maximum allowed z-height for mount.""" pipette = self._state_view.pipettes.get_by_mount(mount) if self._state_view.config.robot_type == "OT-2 Standard": - instrument_height = self._state_view.pipettes.get_instrument_max_height_ot2( - pipette.id + instrument_height = ( + self._state_view.pipettes.get_instrument_max_height_ot2(pipette.id) + if pipette + else VIRTUAL_MAX_OT2_HEIGHT ) else: instrument_height = VIRTUAL_MAX_OT3_HEIGHT diff --git a/api/tests/opentrons/protocol_api/test_robot_context.py b/api/tests/opentrons/protocol_api/test_robot_context.py index 3e0be14b865..c1bdfe48c3f 100644 --- a/api/tests/opentrons/protocol_api/test_robot_context.py +++ b/api/tests/opentrons/protocol_api/test_robot_context.py @@ -15,7 +15,7 @@ ) from opentrons.protocols.api_support.types import APIVersion from opentrons.protocol_api.core.common import ProtocolCore, RobotCore -from opentrons.protocol_api import RobotContext, ModuleContext, MAX_SUPPORTED_VERSION +from opentrons.protocol_api import RobotContext, ModuleContext from opentrons.protocol_api.deck import Deck @@ -28,7 +28,7 @@ def mock_core(decoy: Decoy) -> RobotCore: @pytest.fixture def api_version() -> APIVersion: """Get the API version to test at.""" - return MAX_SUPPORTED_VERSION + return APIVersion(2, 22) @pytest.fixture