Skip to content

Commit

Permalink
fix(app): home before all gripper maintenance (#12792)
Browse files Browse the repository at this point in the history
We were homing before some gripper maintenance flows but not all of
them, and we do need to home before all of them at least while we're
using the left pipette as a proxy for the gripper.
  • Loading branch information
sfoster1 authored May 26, 2023
1 parent ffc3a2c commit a732d6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
15 changes: 5 additions & 10 deletions app/src/organisms/GripperWizardFlows/BeforeBeginning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ export const BeforeBeginning = (
createMaintenanceRun({})
}, [])

let commandsOnProceed: CreateCommand[] = [
const commandsOnProceed: CreateCommand[] = [
// TODO: this needs to go once we're properly handling the axes for the commands
// below instead of using the left pipette axis as a proxy, but until then we need
// to make sure that proxy axis is homed.
{ commandType: 'home' as const, params: {} },
{
// @ts-expect-error(BC, 2022-03-10): this will pass type checks when we update command types from V6 to V7 in shared-data
commandType: 'calibration/moveToMaintenancePosition' as const,
Expand All @@ -79,15 +83,6 @@ export const BeforeBeginning = (
},
},
]
if (
flowType === GRIPPER_FLOW_TYPES.ATTACH ||
flowType === GRIPPER_FLOW_TYPES.RECALIBRATE
) {
commandsOnProceed = [
{ commandType: 'home' as const, params: {} },
...commandsOnProceed,
]
}

const handleOnClick = (): void => {
chainRunCommands(commandsOnProceed, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ describe('BeforeBeginning', () => {
getByRole('button', { name: 'Move gantry to front' }).click()
expect(props.chainRunCommands).toHaveBeenCalledWith(
[
{ commandType: 'home', params: {} },
{
commandType: 'calibration/moveToMaintenancePosition',
params: { mount: 'left' },
Expand Down

0 comments on commit a732d6a

Please sign in to comment.