Skip to content

Commit ef8a7ee

Browse files
committed
fix(protocol-designer): document that pipettes.tiprackURI is a labwareId, not a URI
1 parent a6255d4 commit ef8a7ee

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

step-generation/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ export interface TimelineFrame {
708708
pipettes: {
709709
[pipetteId: string]: {
710710
hasTip: boolean
711+
/** TODO: tiprackURI is a misnomer: it's a labwareId, not a URI */
711712
tiprackURI: string | null
712713
}
713714
}

step-generation/src/utils/safePipetteMovements.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,14 +319,10 @@ export const getIsSafePipetteMovement = (args: {
319319
return true
320320
}
321321

322-
const tiprackURI = tipState.pipettes[pipetteId]?.tiprackURI
323-
const tiprackEntityId =
324-
tiprackURI != null
325-
? Object.keys(labwareEntities).find(lwKey => lwKey.includes(tiprackURI))
326-
: null
322+
const tiprackEntityId = tipState.pipettes[pipetteId]?.tiprackURI
327323
const tiprackTipLength =
328324
tiprackEntityId != null
329-
? labwareEntities[tiprackEntityId].def.parameters.tipLength
325+
? labwareEntities[tiprackEntityId]?.def.parameters.tipLength
330326
: 0
331327
const stagingAreaSlots = Object.values(stagingAreaEntities).map(
332328
stagingArea => stagingArea.location as string

0 commit comments

Comments
 (0)