Skip to content

Commit 8bcf448

Browse files
committed
fix(step-generation): emit configureNozzleLayout when tiprack changes
closes RQA-4307
1 parent b3bbb05 commit 8bcf448

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

step-generation/src/__tests__/replaceTip.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,9 @@ describe('replaceTip', () => {
334334
}
335335
initialRobotState = {
336336
...initialRobotState,
337-
pipettes: { p100096Id: { mount: 'left', nozzles: COLUMN } },
337+
pipettes: {
338+
p100096Id: { mount: 'left', nozzles: COLUMN, tiprackId: tiprack5Id },
339+
},
338340
tipState: {
339341
tipracks: {
340342
[tiprack4Id]: getTiprackTipstate(false),

step-generation/src/commandCreators/compound/replaceTip.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export const replaceTip: CommandCreator<ReplaceTipArgs> = (
5656
isFromMixCommand = false,
5757
} = args
5858
const stateNozzles = prevRobotState.pipettes[pipette].nozzles
59+
const stateTiprack = prevRobotState.pipettes[pipette].tiprackId
5960
if (tipRack == null) {
6061
return {
6162
errors: [errorCreators.noTipSelected()],
@@ -189,7 +190,7 @@ export const replaceTip: CommandCreator<ReplaceTipArgs> = (
189190
// only emit the command if previous nozzle state is different
190191
(channels === 96 || channels === 8) &&
191192
args.nozzles != null &&
192-
args.nozzles !== stateNozzles
193+
(args.nozzles !== stateNozzles || nextTiprack.tiprackId !== stateTiprack)
193194
? [
194195
curryCommandCreator(configureNozzleLayout, {
195196
configurationParams: {

step-generation/src/fixtures/robotStateFixtures.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,11 @@ export const makeStateArgsStandard = (): StandardMakeStateArgs => ({
236236
pipetteLocations: {
237237
[DEFAULT_PIPETTE]: {
238238
mount: 'left',
239+
tiprackId: 'tiprack1Id',
239240
},
240241
[MULTI_PIPETTE]: {
241242
mount: 'right',
243+
tiprackId: 'tiprack1Id',
242244
},
243245
},
244246
labwareLocations: {

step-generation/src/getNextRobotStateAndWarnings/forPickUpTip.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,6 @@ export function forPickUpTip(
4545
tipState.tipracks[labwareId][wellName] = false
4646
})
4747
}
48+
// update tiprackID assosciated with pipette for configureNozzleLayout
49+
robotStateAndWarnings.robotState.pipettes[pipetteId].tiprackId = labwareId
4850
}

step-generation/src/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ export interface PipetteTemporalProperties {
3939
entityId?: string
4040
// primary nozzle's wellName if over a labware
4141
wellName?: string
42+
// pipette's nozzle configuration
4243
nozzles?: NozzleConfigurationStyle
44+
// current tiprack assosciated with pipette
45+
tiprackId?: string
4346
}
4447

4548
export interface MagneticModuleState {

0 commit comments

Comments
 (0)