Skip to content

Commit 8217f4f

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

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
@@ -707,6 +707,7 @@ export interface TimelineFrame {
707707
pipettes: {
708708
[pipetteId: string]: {
709709
hasTip: boolean
710+
/** TODO: tiprackURI is a misnomer: it's a labwareId, not a URI */
710711
tiprackURI: string | null
711712
}
712713
}

step-generation/src/utils/safePipetteMovements.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,14 +344,10 @@ export const getIsSafePipetteMovement = (args: {
344344
return true
345345
}
346346

347-
const tiprackURI = tipState.pipettes[pipetteId]?.tiprackURI
348-
const tiprackEntityId =
349-
tiprackURI != null
350-
? Object.keys(labwareEntities).find(lwKey => lwKey.includes(tiprackURI))
351-
: null
347+
const tiprackEntityId = tipState.pipettes[pipetteId]?.tiprackURI
352348
const tiprackTipLength =
353349
tiprackEntityId != null
354-
? labwareEntities[tiprackEntityId].def.parameters.tipLength
350+
? labwareEntities[tiprackEntityId]?.def.parameters.tipLength
355351
: 0
356352
const stagingAreaSlots = Object.values(stagingAreaEntities).map(
357353
stagingArea => stagingArea.location as string

0 commit comments

Comments
 (0)