diff --git a/api/src/opentrons/protocol_engine/state/modules.py b/api/src/opentrons/protocol_engine/state/modules.py index 19c03dc7a66..e61d1850c44 100644 --- a/api/src/opentrons/protocol_engine/state/modules.py +++ b/api/src/opentrons/protocol_engine/state/modules.py @@ -1314,6 +1314,10 @@ def ensure_and_convert_module_fixture_location( # only allowed in column 3 assert deck_slot.value[-1] == "3" return f"absorbanceReaderV1{deck_slot.value}" + elif model == ModuleModel.FLEX_STACKER_V1: + # only allowed in column 4 + assert deck_slot.value[-1] == "4" + return f"flexStackerV1{deck_slot.value}" raise ValueError( f"Unknown module {model.name} has no addressable areas to provide." diff --git a/api/src/opentrons/protocol_engine/types.py b/api/src/opentrons/protocol_engine/types.py index 9d596adbaa8..411b17a0398 100644 --- a/api/src/opentrons/protocol_engine/types.py +++ b/api/src/opentrons/protocol_engine/types.py @@ -476,6 +476,7 @@ class ModuleModel(str, Enum): HEATER_SHAKER_MODULE_V1 = "heaterShakerModuleV1" MAGNETIC_BLOCK_V1 = "magneticBlockV1" ABSORBANCE_READER_V1 = "absorbanceReaderV1" + FLEX_STACKER_V1 = "flexStackerV1" def as_type(self) -> ModuleType: """Get the ModuleType of this model.""" @@ -491,6 +492,8 @@ def as_type(self) -> ModuleType: return ModuleType.MAGNETIC_BLOCK elif ModuleModel.is_absorbance_reader(self): return ModuleType.ABSORBANCE_READER + elif ModuleModel.is_flex_stacker(self): + return ModuleType.FLEX_STACKER assert False, f"Invalid ModuleModel {self}" @@ -533,6 +536,11 @@ def is_absorbance_reader( ) -> TypeGuard[AbsorbanceReaderModel]: """Whether a given model is an Absorbance Plate Reader.""" return model == cls.ABSORBANCE_READER_V1 + + @classmethod + def is_flex_stacker(cls, model: ModuleModel) -> TypeGuard[FlexStackerModel]: + """Whether a given model is a Flex Stacker.""" + return model == cls.FLEX_STACKER_V1 TemperatureModuleModel = Literal[ @@ -547,6 +555,7 @@ def is_absorbance_reader( HeaterShakerModuleModel = Literal[ModuleModel.HEATER_SHAKER_MODULE_V1] MagneticBlockModel = Literal[ModuleModel.MAGNETIC_BLOCK_V1] AbsorbanceReaderModel = Literal[ModuleModel.ABSORBANCE_READER_V1] +FlexStackerModel = Literal[ModuleModel.FLEX_STACKER_V1] class ModuleDimensions(BaseModel):