diff --git a/components/src/hooks/useSelectDeckLocation/index.tsx b/components/src/hooks/useSelectDeckLocation/index.tsx index f1fe7ab7589..6a801765a33 100644 --- a/components/src/hooks/useSelectDeckLocation/index.tsx +++ b/components/src/hooks/useSelectDeckLocation/index.tsx @@ -77,7 +77,7 @@ export function DeckLocationSelect({ {deckDef.locations.addressableAreas // only render standard slot fixture components .filter(addressableArea => - isAddressableAreaStandardSlot(addressableArea.id) + isAddressableAreaStandardSlot(addressableArea.id, deckDef) ) .map(slot => { const slotLocation = { slotName: slot.id } diff --git a/protocol-designer/src/components/DeckSetup/index.tsx b/protocol-designer/src/components/DeckSetup/index.tsx index 71459e4fbeb..591eded8d1d 100644 --- a/protocol-designer/src/components/DeckSetup/index.tsx +++ b/protocol-designer/src/components/DeckSetup/index.tsx @@ -173,6 +173,12 @@ export const DeckSetupContents = (props: ContentsProps): JSX.Element => { ]) : [] + console.log('AA', + deckDef.locations.addressableAreas + .filter( + addressableArea => + isAddressableAreaStandardSlot(addressableArea.id, deckDef) + )) return ( <> {/* all modules */} @@ -335,7 +341,7 @@ export const DeckSetupContents = (props: ContentsProps): JSX.Element => { // only render standard slot fixture components .filter( addressableArea => - isAddressableAreaStandardSlot(addressableArea.id) && + isAddressableAreaStandardSlot(addressableArea.id, deckDef) && !slotIdsBlockedBySpanning.includes(addressableArea.id) && getSlotIsEmpty(activeDeckSetup, addressableArea.id) && addressableArea.id !== trashSlot @@ -526,7 +532,7 @@ export const DeckSetup = (): JSX.Element => { ).filter(aE => aE.name === STAGING_AREA_LOAD_NAME) const filteredAddressableAreas = deckDef.locations.addressableAreas.filter( - aa => isAddressableAreaStandardSlot(aa.id) + aa => isAddressableAreaStandardSlot(aa.id, deckDef) ) return ( diff --git a/shared-data/js/fixtures.ts b/shared-data/js/fixtures.ts index bc7e9e18176..8187fb8dcfa 100644 --- a/shared-data/js/fixtures.ts +++ b/shared-data/js/fixtures.ts @@ -105,6 +105,21 @@ export function getFixtureDisplayName(loadName: FixtureLoadName): string { } } + +const STANDARD_OT2_SLOTS = [ + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + '10', + '11', +] + const STANDARD_FLEX_SLOTS = [ 'A1', 'A2', @@ -121,5 +136,6 @@ const STANDARD_FLEX_SLOTS = [ ] export const isAddressableAreaStandardSlot = ( - addressableAreaId: string -): boolean => STANDARD_FLEX_SLOTS.includes(addressableAreaId) + addressableAreaId: string, + deckDef: DeckDefinition +): boolean => (deckDef.robot.model === FLEX_ROBOT_TYPE ? STANDARD_FLEX_SLOTS : STANDARD_OT2_SLOTS).includes(addressableAreaId)