Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labware creator adapter fix attempt #17347

Open
wants to merge 3 commits into
base: edge
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions labware-library/src/labware-creator/fieldsToLabware.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createRegularLabware } from '@opentrons/shared-data'
import { createRegularLabware, getModuleDef2 } from '@opentrons/shared-data'

import { DISPLAY_VOLUME_UNITS } from './fields'
import { getIsCustomTubeRack } from './utils'
Expand All @@ -11,6 +11,7 @@ import type {
LabwareDisplayCategory,
LabwareWellProperties,
LabwareOffset,
ModuleModel,
} from '@opentrons/shared-data'

// TODO Ian 2019-07-29: move this constant to shared-data?
Expand Down Expand Up @@ -121,11 +122,15 @@ export function fieldsToLabware(
})
const stackingOffsetWithModule: Record<string, LabwareOffset> = {}
Object.entries(compatibleModules).forEach(([moduleModel, z]) => {
const moduleDefinition = getModuleDef2(moduleModel as ModuleModel)
return (stackingOffsetWithModule[moduleModel] = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like you need to import ModuleModel! import type { ModuleModel } from '@opentrons/shared-data'

x: 0,
y: 0,
// ensure that z is a number!
z: fields.labwareZDimension - parseFloat(String(z)),
z:
fields.labwareZDimension -
parseFloat(String(z)) +
moduleDefinition.dimensions.bareOverallHeight,
})
})

Expand Down
Loading