Skip to content

Commit

Permalink
fix(app): handle detaching 96 when attaching right (#16174)
Browse files Browse the repository at this point in the history
When we're switching pipettes from a preprotocol flow, we were not
properly handling the case where a 96 is attached and we want to take it
off and attach a pipette to the right mount. Add handling for that.

I'm not really sure how this survived so long because it sure seems like
it's always been there.

When reviewing, go commit by commit to see the flow of refactors. Also
the logic table looks awful in the diff view unless you make your screen
really wide but it's fine if you're just looking at the file

## testing
- [x] if you have a 96 channel attached, and you set up a protocol with
a multi or single on the right mount, does the flow for detaching the 96
and attaching the right mount pipette go correctly

Closes RQA-3123
  • Loading branch information
sfoster1 authored Aug 30, 2024
1 parent 34e633f commit 933175f
Show file tree
Hide file tree
Showing 3 changed files with 501 additions and 384 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,15 @@ async def execute(
await ot3_api.move_axes(
{
Axis.Z_L: max_motion_range + _LEFT_MOUNT_Z_MARGIN,
}
)
await ot3_api.disengage_axes([Axis.Z_L])
await ot3_api.move_axes(
{
Axis.Z_R: max_motion_range + _RIGHT_MOUNT_Z_MARGIN,
}
)
await ot3_api.disengage_axes([Axis.Z_L, Axis.Z_R])
await ot3_api.disengage_axes([Axis.Z_R])

return SuccessData(public=MoveToMaintenancePositionResult(), private=None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ const mockPipetteInfo = [
const mockPipettesInProtocolNotEmpty = [
{ id: '123', pipetteName: 'p1000_single_flex', mount: 'left' },
]
const mockPipettesInProtocolOnRight = [
{ id: '123', pipetteName: 'p1000_single_flex', mount: 'right' },
]
const mockPipettesInProtocolMulti = [
{ id: '123', pipetteName: 'p1000_multi_flex', mount: 'left' },
]
Expand Down Expand Up @@ -113,7 +116,7 @@ describe('getPipetteWizardStepsForProtocol', () => {
).toStrictEqual(mockFlowSteps)
})

it('returns the correct array of info when the attached 96-channel pipette needs to be switched out for single mount', () => {
it('returns the correct array of info when the attached 96-channel pipette needs to be switched out for single mount on left', () => {
const mockFlowSteps = [
{
section: SECTIONS.BEFORE_BEGINNING,
Expand Down Expand Up @@ -176,6 +179,69 @@ describe('getPipetteWizardStepsForProtocol', () => {
)
).toStrictEqual(mockFlowSteps)
})
it('returns the correct array of info when the attached 96-channel pipette needs to be switched out for single mount on right', () => {
const mockFlowSteps = [
{
section: SECTIONS.BEFORE_BEGINNING,
mount: LEFT,
flowType: FLOWS.DETACH,
},
{
section: SECTIONS.DETACH_PIPETTE,
mount: LEFT,
flowType: FLOWS.DETACH,
},
{
section: SECTIONS.MOUNTING_PLATE,
mount: LEFT,
flowType: FLOWS.DETACH,
},
{
section: SECTIONS.CARRIAGE,
mount: LEFT,
flowType: FLOWS.DETACH,
},
{
section: SECTIONS.RESULTS,
mount: LEFT,
flowType: FLOWS.DETACH,
nextMount: RIGHT,
},
{
section: SECTIONS.MOUNT_PIPETTE,
mount: RIGHT,
flowType: FLOWS.ATTACH,
},
{
section: SECTIONS.FIRMWARE_UPDATE,
mount: RIGHT,
flowType: FLOWS.ATTACH,
},
{ section: SECTIONS.RESULTS, mount: RIGHT, flowType: FLOWS.ATTACH },
{
section: SECTIONS.ATTACH_PROBE,
mount: RIGHT,
flowType: FLOWS.ATTACH,
},
{
section: SECTIONS.DETACH_PROBE,
mount: RIGHT,
flowType: FLOWS.ATTACH,
},
{
section: SECTIONS.RESULTS,
mount: RIGHT,
flowType: FLOWS.CALIBRATE,
},
] as PipetteWizardStep[]
expect(
getPipetteWizardStepsForProtocol(
{ left: mock96ChannelAttachedPipetteInformation, right: null },
mockPipettesInProtocolOnRight as any,
RIGHT
)
).toStrictEqual(mockFlowSteps)
})
it('returns the correct array of info when the attached pipette on left mount needs to be switched out for 96-channel', () => {
const mockFlowSteps = [
{
Expand Down
Loading

0 comments on commit 933175f

Please sign in to comment.