From 6fd024550b85511de0a7432d1943baaacafb77bf Mon Sep 17 00:00:00 2001 From: CaseyBatten Date: Thu, 7 Dec 2023 12:32:06 -0500 Subject: [PATCH] Adjustment to support trash labware --- api/src/opentrons/protocol_api/core/engine/protocol.py | 7 ------- api/src/opentrons/protocol_api/protocol_context.py | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/src/opentrons/protocol_api/core/engine/protocol.py b/api/src/opentrons/protocol_api/core/engine/protocol.py index 2733aabdb09..886252674d4 100644 --- a/api/src/opentrons/protocol_api/core/engine/protocol.py +++ b/api/src/opentrons/protocol_api/core/engine/protocol.py @@ -106,13 +106,6 @@ def __init__( ] = {} self._disposal_locations: List[Union[Labware, TrashBin, WasteChute]] = [] self._load_fixed_trash() - if(self._api_version < APIVersion(2,16)): - #add to disposal locations a fixed trash labware - elif(self._api_version >= APIVersion(2,16) and self.robot_type == "OT-2 Standard"): - fixed_trash: TrashBin( - location=DeckSlotName.FIXED_TRASH, addressable_area_name="fixedTrash" - ) - self._disposal_locations.append(fixed_trash) @property def api_version(self) -> APIVersion: diff --git a/api/src/opentrons/protocol_api/protocol_context.py b/api/src/opentrons/protocol_api/protocol_context.py index d64257cbb74..cfafdf200ce 100644 --- a/api/src/opentrons/protocol_api/protocol_context.py +++ b/api/src/opentrons/protocol_api/protocol_context.py @@ -139,6 +139,13 @@ def __init__( } self._bundled_data: Dict[str, bytes] = bundled_data or {} self._load_fixed_trash() + if(self._api_version < APIVersion(2,16)): + self._core.append_disposal_location(self.fixed_trash) + elif(self._api_version >= APIVersion(2,16) and self.robot_type == "OT-2 Standard"): + fixed_trash: TrashBin( + location=DeckSlotName.FIXED_TRASH, addressable_area_name="fixedTrash" + ) + self._core.append_disposal_location(fixed_trash) self._commands: List[str] = [] self._unsubscribe_commands: Optional[Callable[[], None]] = None