Skip to content

Commit

Permalink
Merge branch 'add_modules_to_deck_config' of https://github.com/Opent…
Browse files Browse the repository at this point in the history
…rons/opentrons into add_modules_to_deck_config
  • Loading branch information
CaseyBatten committed Mar 20, 2024
2 parents b42ca46 + 0ef5d70 commit 93ff8af
Show file tree
Hide file tree
Showing 9 changed files with 361 additions and 100 deletions.
6 changes: 3 additions & 3 deletions components/src/hardware-sim/DeckSlotLocation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'
import {
getPositionFromSlotId,
OT2_ROBOT_TYPE,
ot2DeckDefV4,
ot2DeckDefV5,
} from '@opentrons/shared-data'

import { SlotBase } from '../BaseDeck/SlotBase'
Expand Down Expand Up @@ -40,7 +40,7 @@ export function LegacyDeckSlotLocation(

if (robotType !== OT2_ROBOT_TYPE) return null

const slotDef = ot2DeckDefV4.locations.addressableAreas.find(
const slotDef = ot2DeckDefV5.locations.addressableAreas.find(
s => s.id === slotName
)
if (slotDef == null) {
Expand All @@ -52,7 +52,7 @@ export function LegacyDeckSlotLocation(

const slotPosition = getPositionFromSlotId(
slotName,
(ot2DeckDefV4 as unknown) as DeckDefinition
(ot2DeckDefV5 as unknown) as DeckDefinition
)

const isFixedTrash = slotName === 'fixedTrash'
Expand Down
6 changes: 4 additions & 2 deletions shared-data/deck/definitions/5/ot3_standard.json
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,9 @@
"expectOpentronsModuleSerialNumber": true,
"mayMountTo": ["cutoutA1"],
"displayName": "Rear Slot portion of the Thermocycler Moduler",
"providesAddressableAreas": {},
"providesAddressableAreas": {
"cutoutA1": ["thermocyclerModuleV2"]
},
"fixtureGroup": ["thermocyclerModuleV2Rear", "thermocyclerModuleV2Front"],
"height": 124.5
},
Expand Down Expand Up @@ -924,7 +926,7 @@
"cutoutC1": ["heaterShakerV1C1"],
"cutoutB1": ["heaterShakerV1B1"],
"cutoutA1": ["heaterShakerV1A1"],
"cutoutD3": ["heaterShakerV13"],
"cutoutD3": ["heaterShakerV1D3"],
"cutoutC3": ["heaterShakerV1C3"],
"cutoutB3": ["heaterShakerV1B3"],
"cutoutA3": ["heaterShakerV1A3"]
Expand Down
16 changes: 12 additions & 4 deletions shared-data/deck/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ import ot2StandardDeckV4 from './definitions/4/ot2_standard.json'
import ot2ShortFixedTrashDeckV4 from './definitions/4/ot2_short_trash.json'
import ot3StandardDeckV4 from './definitions/4/ot3_standard.json'

// v5 deck defs
import ot2StandardDeckV5 from './definitions/5/ot2_standard.json'
import ot2ShortFixedTrashDeckV5 from './definitions/5/ot2_short_trash.json'
import ot3StandardDeckV5 from './definitions/5/ot3_standard.json'

import deckExample from './fixtures/3/deckExample.json'

import type { DeckDefinition } from '../js/types'

export * from './types/schemaV4'
export * from './types/schemaV5'

export {
ot2StandardDeckV3,
Expand All @@ -21,13 +26,16 @@ export {
ot2StandardDeckV4,
ot2ShortFixedTrashDeckV4,
ot3StandardDeckV4,
ot2StandardDeckV5,
ot2ShortFixedTrashDeckV5,
ot3StandardDeckV5,
deckExample,
}

const latestDeckDefinitions = {
ot2StandardDeckV4,
ot2ShortFixedTrashDeckV4,
ot3StandardDeckV4,
ot2StandardDeckV5,
ot2ShortFixedTrashDeckV5,
ot3StandardDeckV5,
}

export function getDeckDefinitions(): Record<string, DeckDefinition> {
Expand Down
140 changes: 140 additions & 0 deletions shared-data/deck/types/schemaV5.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
export type FlexAddressableAreaName =
| 'A1'
| 'B1'
| 'C1'
| 'D1'
| 'A2'
| 'B2'
| 'C2'
| 'D2'
| 'A3'
| 'B3'
| 'C3'
| 'D3'
| 'A4'
| 'B4'
| 'C4'
| 'D4'
| 'movableTrashA1'
| 'movableTrashB1'
| 'movableTrashC1'
| 'movableTrashD1'
| 'movableTrashA3'
| 'movableTrashB3'
| 'movableTrashC3'
| 'movableTrashD3'
| '1ChannelWasteChute'
| '8ChannelWasteChute'
| '96ChannelWasteChute'
| 'gripperWasteChute'
| 'thermocyclerModuleV2'
| 'heaterShakerV1A1'
| 'heaterShakerV1B1'
| 'heaterShakerV1C1'
| 'heaterShakerV1D1'
| 'heaterShakerV1A3'
| 'heaterShakerV1B3'
| 'heaterShakerV1C3'
| 'heaterShakerV1D3'
| 'temperatureModuleV2A1'
| 'temperatureModuleV2B1'
| 'temperatureModuleV2C1'
| 'temperatureModuleV2D1'
| 'temperatureModuleV2A3'
| 'temperatureModuleV2B3'
| 'temperatureModuleV2C3'
| 'temperatureModuleV2D3'
| 'magneticBlockV1A1'
| 'magneticBlockV1B1'
| 'magneticBlockV1C1'
| 'magneticBlockV1D1'
| 'magneticBlockV1A2'
| 'magneticBlockV1B2'
| 'magneticBlockV1C2'
| 'magneticBlockV1D2'
| 'magneticBlockV1A3'
| 'magneticBlockV1B3'
| 'magneticBlockV1C3'
| 'magneticBlockV1D3'

export type OT2AddressableAreaName =
| '1'
| '2'
| '3'
| '4'
| '5'
| '6'
| '7'
| '8'
| '9'
| '10'
| '11'
| '12'
| 'fixedTrash'

export type AddressableAreaName =
| FlexAddressableAreaName
| OT2AddressableAreaName

export type CutoutId =
| 'cutoutD1'
| 'cutoutD2'
| 'cutoutD3'
| 'cutoutC1'
| 'cutoutC2'
| 'cutoutC3'
| 'cutoutB1'
| 'cutoutB2'
| 'cutoutB3'
| 'cutoutA1'
| 'cutoutA2'
| 'cutoutA3'

export type OT2CutoutId =
| 'cutout1'
| 'cutout2'
| 'cutout3'
| 'cutout4'
| 'cutout5'
| 'cutout6'
| 'cutout7'
| 'cutout8'
| 'cutout9'
| 'cutout10'
| 'cutout11'
| 'cutout12'

export type SingleSlotCutoutFixtureId =
| 'singleLeftSlot'
| 'singleCenterSlot'
| 'singleRightSlot'

export type StagingAreaRightSlotFixtureId = 'stagingAreaRightSlot'

export type TrashBinAdapterCutoutFixtureId = 'trashBinAdapter'

export type WasteChuteCutoutFixtureId =
| 'wasteChuteRightAdapterCovered'
| 'wasteChuteRightAdapterNoCover'
| 'stagingAreaSlotWithWasteChuteRightAdapterCovered'
| 'stagingAreaSlotWithWasteChuteRightAdapterNoCover'

export type FlexModuleCutoutFixtureId =
| 'heaterShakerModuleV1'
| 'temperatureModuleV2'
| 'magneticBlockModuleV1'
| 'thermocyclerModuleV2Rear'
| 'thermocyclerModuleV2Front'

export type OT2SingleStandardSlot = 'singleStandardSlot'

export type OT2FixedTrashSlot = 'fixedTrashSlot'

export type CutoutFixtureId =
| SingleSlotCutoutFixtureId
| StagingAreaRightSlotFixtureId
| TrashBinAdapterCutoutFixtureId
| WasteChuteCutoutFixtureId
| FlexModuleCutoutFixtureId
| OT2SingleStandardSlot
| OT2FixedTrashSlot
35 changes: 33 additions & 2 deletions shared-data/js/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CutoutFixtureId, CutoutId, AddressableAreaName } from '../deck'
import type { ModuleType } from './types'
import type { CutoutFixtureId, CutoutId, AddressableAreaName, FlexModuleCutoutFixtureId } from '../deck'
import type { ModuleModel, ModuleType } from './types'

// constants for dealing with robot coordinate system (eg in labwareTools)
export const SLOT_LENGTH_MM = 127.76 // along X axis in robot coordinate system
Expand Down Expand Up @@ -275,6 +275,24 @@ export const NINETY_SIX_CHANNEL_WASTE_CHUTE_ADDRESSABLE_AREA: '96ChannelWasteChu
export const GRIPPER_WASTE_CHUTE_ADDRESSABLE_AREA: 'gripperWasteChute' =
'gripperWasteChute'

export const THERMOCYCLER_ADDRESSABLE_AREA: 'thermocyclerModule' = 'thermocyclerModule'
export const HEATERSHAKER_A1_ADDRESSABLE_AREA: 'heaterShakerA1' = 'heaterShakerA1'
export const HEATERSHAKER_B1_ADDRESSABLE_AREA: 'heaterShakerB1' = 'heaterShakerB1'
export const HEATERSHAKER_C1_ADDRESSABLE_AREA: 'heaterShakerC1' = 'heaterShakerC1'
export const HEATERSHAKER_D1_ADDRESSABLE_AREA: 'heaterShakerD1' = 'heaterShakerD1'
export const HEATERSHAKER_A3_ADDRESSABLE_AREA: 'heaterShakerA3' = 'heaterShakerA3'
export const HEATERSHAKER_B3_ADDRESSABLE_AREA: 'heaterShakerB3' = 'heaterShakerB3'
export const HEATERSHAKER_C3_ADDRESSABLE_AREA: 'heaterShakerC3' = 'heaterShakerC3'
export const HEATERSHAKER_D3_ADDRESSABLE_AREA: 'heaterShakerD3' = 'heaterShakerD3'
export const TEMPERATURE_MODULE_A1_ADDRESSABLE_AREA: 'temperatureModuleA1' = 'temperatureModuleA1'
export const TEMPERATURE_MODULE_B1_ADDRESSABLE_AREA: 'temperatureModuleB1' = 'temperatureModuleB1'
export const TEMPERATURE_MODULE_C1_ADDRESSABLE_AREA: 'temperatureModuleC1' = 'temperatureModuleC1'
export const TEMPERATURE_MODULE_D1_ADDRESSABLE_AREA: 'temperatureModuleD1' = 'temperatureModuleD1'
export const TEMPERATURE_MODULE_A3_ADDRESSABLE_AREA: 'temperatureModuleA3' = 'temperatureModuleA3'
export const TEMPERATURE_MODULE_B3_ADDRESSABLE_AREA: 'temperatureModuleB3' = 'temperatureModuleB3'
export const TEMPERATURE_MODULE_C3_ADDRESSABLE_AREA: 'temperatureModuleC3' = 'temperatureModuleC3'
export const TEMPERATURE_MODULE_D3_ADDRESSABLE_AREA: 'temperatureModuleD3' = 'temperatureModuleD3'

export const ADDRESSABLE_AREA_1: '1' = '1'
export const ADDRESSABLE_AREA_2: '2' = '2'
export const ADDRESSABLE_AREA_3: '3' = '3'
Expand Down Expand Up @@ -359,6 +377,19 @@ export const STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE: '
export const STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE: 'stagingAreaSlotWithWasteChuteRightAdapterNoCover' =
'stagingAreaSlotWithWasteChuteRightAdapterNoCover'

export const HEATERSHAKER_MODULE_V1_FIXTURE: 'heaterShakerModuleV1' = 'heaterShakerModuleV1'
export const TEMPERATURE_MODULE_V2_FIXTURE: 'temperatureModuleV2' = 'temperatureModuleV2'
export const MAGNETIC_BLOCK_V1_FIXTURE: 'magneticBlockModuleV1' = 'magneticBlockModuleV1'
export const THERMOCYCLER_V2_REAR_FIXTURE: 'thermocyclerModuleV2Rear' = 'thermocyclerModuleV2Rear'
export const THERMOCYCLER_V2_FRONT_FIXTURE: 'thermocyclerModuleV2Front' = 'thermocyclerModuleV2Front'

export const MODULE_FIXTURES_BY_MODEL: {[moduleModel in ModuleModel]?: FlexModuleCutoutFixtureId[]} = {
[HEATERSHAKER_MODULE_V1]: [HEATERSHAKER_MODULE_V1_FIXTURE],
[TEMPERATURE_MODULE_V2]: [TEMPERATURE_MODULE_V2_FIXTURE],
[MAGNETIC_BLOCK_V1]: [MAGNETIC_BLOCK_V1_FIXTURE],
[THERMOCYCLER_MODULE_V2]: [THERMOCYCLER_V2_REAR_FIXTURE, THERMOCYCLER_V2_FRONT_FIXTURE],
}

export const SINGLE_SLOT_FIXTURES: CutoutFixtureId[] = [
SINGLE_LEFT_SLOT_FIXTURE,
SINGLE_CENTER_SLOT_FIXTURE,
Expand Down
8 changes: 4 additions & 4 deletions shared-data/js/deck/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import flexDeckDefV4 from '../../deck/definitions/4/ot3_standard.json'
import ot2DeckDefV4 from '../../deck/definitions/4/ot2_standard.json'
import ot2DeckDefShortFixedTrashV4 from '../../deck/definitions/4/ot2_short_trash.json'
import flexDeckDefV5 from '../../deck/definitions/5/ot3_standard.json'
import ot2DeckDefV5 from '../../deck/definitions/5/ot2_standard.json'
import ot2DeckDefShortFixedTrashV5 from '../../deck/definitions/5/ot2_short_trash.json'

export { ot2DeckDefV4, ot2DeckDefShortFixedTrashV4, flexDeckDefV4 }
export { ot2DeckDefV5, ot2DeckDefShortFixedTrashV5, flexDeckDefV5 }
Loading

0 comments on commit 93ff8af

Please sign in to comment.