Skip to content

Commit

Permalink
deck conflict checking fix first pass
Browse files Browse the repository at this point in the history
  • Loading branch information
CaseyBatten committed Jan 17, 2025
1 parent bb4e171 commit f090c32
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 5 additions & 2 deletions api/src/opentrons/motion_planning/deck_conflict.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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[
Expand Down Expand Up @@ -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."
Expand Down
8 changes: 8 additions & 0 deletions api/src/opentrons/protocol_api/core/engine/deck_conflict.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f090c32

Please sign in to comment.