diff --git a/api/src/opentrons/motion_planning/deck_conflict.py b/api/src/opentrons/motion_planning/deck_conflict.py index 69453928511..3f598e5c682 100644 --- a/api/src/opentrons/motion_planning/deck_conflict.py +++ b/api/src/opentrons/motion_planning/deck_conflict.py @@ -78,6 +78,9 @@ class _Module: class HeaterShakerModule(_Module): """A Heater-Shaker module.""" +@dataclass +class FlexStackerModule(_Module): + """A Heater-Shaker module.""" @dataclass class MagneticBlockModule(_Module): @@ -97,7 +100,7 @@ class ThermocyclerModule(_Module): @dataclass class OtherModule(_Module): - """A module that's not a Heater-Shaker or Thermocycler.""" + """A module that's not a Heater-Shaker or Thermocycler or a Flex Stacker.""" DeckItem = Union[ @@ -304,7 +307,7 @@ def _create_flex_restrictions( ) ] - if isinstance(item, (HeaterShakerModule, OtherModule)): + if isinstance(item, (HeaterShakerModule, OtherModule)) and not isinstance(item, FlexStackerModule): if isinstance(location, StagingSlotName): raise DeckConflictError( "Cannot have a module loaded on a staging area slot." diff --git a/api/src/opentrons/protocol_api/core/engine/deck_conflict.py b/api/src/opentrons/protocol_api/core/engine/deck_conflict.py index ee724ea5ca3..cbb00a4fd62 100644 --- a/api/src/opentrons/protocol_api/core/engine/deck_conflict.py +++ b/api/src/opentrons/protocol_api/core/engine/deck_conflict.py @@ -296,6 +296,14 @@ def _map_module( is_semi_configuration=False, ), ) + if module_type == ModuleType.FLEX_STACKER: + return ( + mapped_location, + wrapped_deck_conflict.FlexStackerModule( + name_for_errors=name_for_errors, + highest_z_including_labware=highest_z_including_labware, + ), + ) else: return ( mapped_location,