diff --git a/protocol-designer/src/timelineMiddleware/__tests__/generateRobotStateTimeline.test.ts b/protocol-designer/src/timelineMiddleware/__tests__/generateRobotStateTimeline.test.ts index 841df3d6382..0576f16a019 100644 --- a/protocol-designer/src/timelineMiddleware/__tests__/generateRobotStateTimeline.test.ts +++ b/protocol-designer/src/timelineMiddleware/__tests__/generateRobotStateTimeline.test.ts @@ -294,21 +294,21 @@ mock_pipette.move_to(mock_source_plate["A1"].top(z=2)) mock_pipette.prepare_to_aspirate() mock_pipette.move_to(mock_source_plate["A1"].bottom()) mock_pipette.move_to(mock_source_plate["A1"].bottom()) -mock_pipette.aspirate(...) +mock_pipette.aspirate(volume=5, flow_rate=3.78) mock_pipette.move_to(mock_source_plate["A1"].bottom()) mock_pipette.move_to(mock_dest_plate["A12"].bottom()) mock_pipette.move_to(mock_dest_plate["A12"].bottom()) -mock_pipette.dispense(...) +mock_pipette.dispense(volume=5, flow_rate=3.78) mock_pipette.move_to(mock_dest_plate["A12"].bottom()) mock_pipette.move_to(mock_source_plate["A2"].top(z=2)) mock_pipette.prepare_to_aspirate() mock_pipette.move_to(mock_source_plate["A2"].bottom()) mock_pipette.move_to(mock_source_plate["A2"].bottom()) -mock_pipette.aspirate(...) +mock_pipette.aspirate(volume=5, flow_rate=3.78) mock_pipette.move_to(mock_source_plate["A2"].bottom()) mock_pipette.move_to(mock_dest_plate["A12"].bottom()) mock_pipette.move_to(mock_dest_plate["A12"].bottom()) -mock_pipette.dispense(...) +mock_pipette.dispense(volume=5, flow_rate=3.78) mock_pipette.move_to(mock_dest_plate["A12"].bottom()) mock_pipette.drop_tip() `.trim(), @@ -319,11 +319,11 @@ mock_pipette_p300_multi.move_to(mock_source_plate["A1"].top(z=2)) mock_pipette_p300_multi.prepare_to_aspirate() mock_pipette_p300_multi.move_to(mock_source_plate["A1"].bottom()) mock_pipette_p300_multi.move_to(mock_source_plate["A1"].bottom()) -mock_pipette_p300_multi.aspirate(...) +mock_pipette_p300_multi.aspirate(volume=5, flow_rate=3.78) mock_pipette_p300_multi.move_to(mock_source_plate["A1"].bottom()) mock_pipette_p300_multi.move_to(mock_dest_plate["A12"].bottom()) mock_pipette_p300_multi.move_to(mock_dest_plate["A12"].bottom()) -mock_pipette_p300_multi.dispense(...) +mock_pipette_p300_multi.dispense(volume=5, flow_rate=3.78) mock_pipette_p300_multi.move_to(mock_dest_plate["A12"].bottom()) mock_pipette_p300_multi.drop_tip() `.trim(), diff --git a/step-generation/src/__tests__/aspirate.test.ts b/step-generation/src/__tests__/aspirate.test.ts index f052a5ab71b..ab5a29656ca 100644 --- a/step-generation/src/__tests__/aspirate.test.ts +++ b/step-generation/src/__tests__/aspirate.test.ts @@ -106,7 +106,7 @@ describe('aspirate', () => { mock_pipette.aspirate( volume=50, location=mock_source_plate["A1"].bottom(z=5), - rate=6 / mock_pipette.flow_rate.aspirate, + flow_rate=6, )`.trimStart() ) }) diff --git a/step-generation/src/__tests__/aspirateInPlace.test.ts b/step-generation/src/__tests__/aspirateInPlace.test.ts index ef310ec9c02..07d823085b2 100644 --- a/step-generation/src/__tests__/aspirateInPlace.test.ts +++ b/step-generation/src/__tests__/aspirateInPlace.test.ts @@ -40,11 +40,7 @@ describe('aspirateInPlace', () => { }, ]) expect(getSuccessResult(result).python).toBe( - ` -mock_pipette.aspirate( - volume=10, - rate=20 / mock_pipette.flow_rate.aspirate, -)`.trimStart() + `mock_pipette.aspirate(volume=10, flow_rate=20)` ) }) }) diff --git a/step-generation/src/__tests__/dispense.test.ts b/step-generation/src/__tests__/dispense.test.ts index 312547d2eeb..ed637a6e790 100644 --- a/step-generation/src/__tests__/dispense.test.ts +++ b/step-generation/src/__tests__/dispense.test.ts @@ -93,7 +93,7 @@ describe('dispense', () => { mock_pipette.dispense( volume=50, location=mock_source_plate["A1"].bottom(z=5), - rate=6 / mock_pipette.flow_rate.dispense, + flow_rate=6, )`.trimStart() ) }) diff --git a/step-generation/src/__tests__/dispenseInPlace.test.ts b/step-generation/src/__tests__/dispenseInPlace.test.ts index 046d3ae775e..762e91058e9 100644 --- a/step-generation/src/__tests__/dispenseInPlace.test.ts +++ b/step-generation/src/__tests__/dispenseInPlace.test.ts @@ -40,12 +40,6 @@ describe('dispenseInPlace', () => { }, }, ]) - expect(res.python).toBe( - ` -mock_pipette.dispense( - volume=10, - rate=10 / mock_pipette.flow_rate.dispense, -)`.trimStart() - ) + expect(res.python).toBe(`mock_pipette.dispense(volume=10, flow_rate=10)`) }) }) diff --git a/step-generation/src/commandCreators/atomic/aspirate.ts b/step-generation/src/commandCreators/atomic/aspirate.ts index 5d9d161abb9..bef98bd5a9c 100644 --- a/step-generation/src/commandCreators/atomic/aspirate.ts +++ b/step-generation/src/commandCreators/atomic/aspirate.ts @@ -275,9 +275,7 @@ export const aspirate: CommandCreator = ( `location=${labwarePythonName}[${formatPyStr( wellName )}]${formatPyWellLocation(wellLocation)}`, - // rate= is a ratio in the PAPI, and we have no good way to figure out what - // flowrate the PAPI has set the pipette to, so we just have to do a division: - `rate=${flowRate} / ${pipettePythonName}.flow_rate.aspirate`, + `flow_rate=${flowRate}`, ] const python = `${pipettePythonName}.aspirate(\n${indentPyLines( pythonArgs.join(',\n') diff --git a/step-generation/src/commandCreators/atomic/aspirateInPlace.ts b/step-generation/src/commandCreators/atomic/aspirateInPlace.ts index 671a1643247..555749a9afe 100644 --- a/step-generation/src/commandCreators/atomic/aspirateInPlace.ts +++ b/step-generation/src/commandCreators/atomic/aspirateInPlace.ts @@ -1,5 +1,5 @@ import * as errorCreators from '../../errorCreators' -import { indentPyLines, uuid } from '../../utils' +import { uuid } from '../../utils' import type { AspirateInPlaceParams } from '@opentrons/shared-data' import type { CommandCreator, CommandCreatorError } from '../../types' @@ -37,14 +37,10 @@ export const aspirateInPlace: CommandCreator = ( invariantContext.pipetteEntities[pipetteId].pythonName const pythonArgs = [ `volume=${volume}`, - // rate= is a ratio in the PAPI, and we have no good way to figure out what - // flowrate the PAPI has set the pipette to, so we just have to do a division: - `rate=${flowRate} / ${pipettePythonName}.flow_rate.aspirate`, + `flow_rate=${flowRate}`, // Note that correction volume is not supported in our public atomic liquid handling APIs ] - const python = `${pipettePythonName}.aspirate(\n${indentPyLines( - pythonArgs.join(',\n') - )},\n)` + const python = `${pipettePythonName}.aspirate(${pythonArgs.join(', ')})` if (errors.length > 0) { return { diff --git a/step-generation/src/commandCreators/atomic/dispense.ts b/step-generation/src/commandCreators/atomic/dispense.ts index ddca2accee5..566b11c100b 100644 --- a/step-generation/src/commandCreators/atomic/dispense.ts +++ b/step-generation/src/commandCreators/atomic/dispense.ts @@ -245,9 +245,7 @@ export const dispense: CommandCreator = ( `location=${labwarePythonName}[${formatPyStr( wellName )}]${formatPyWellLocation(wellLocation)}`, - // rate= is a ratio in the PAPI, and we have no good way to figure out what - // flowrate the PAPI has set the pipette to, so we just have to emit a division: - `rate=${flowRate} / ${pipettePythonName}.flow_rate.dispense`, + `flow_rate=${flowRate}`, // only pass push_out if it is not null ...(pushOut != null ? [`push_out=${pushOut}`] : []), // PAPI has no way to indicate that we're dispensing air, so we don't do anything diff --git a/step-generation/src/commandCreators/atomic/dispenseInPlace.ts b/step-generation/src/commandCreators/atomic/dispenseInPlace.ts index 3ce6892fb3a..930db90d6ba 100644 --- a/step-generation/src/commandCreators/atomic/dispenseInPlace.ts +++ b/step-generation/src/commandCreators/atomic/dispenseInPlace.ts @@ -1,5 +1,5 @@ import * as errorCreators from '../../errorCreators' -import { indentPyLines, uuid } from '../../utils' +import { uuid } from '../../utils' import type { DispenseInPlaceParams } from '@opentrons/shared-data' import type { CommandCreator, CommandCreatorError } from '../../types' @@ -38,15 +38,11 @@ export const dispenseInPlace: CommandCreator = ( invariantContext.pipetteEntities[pipetteId].pythonName const pythonArgs = [ `volume=${volume}`, - // rate= is a ratio in the PAPI, and we have no good way to figure out what - // flowrate the PAPI has set the pipette to, so we just have to do a division: - `rate=${flowRate} / ${pipettePythonName}.flow_rate.dispense`, + `flow_rate=${flowRate}`, ...(pushOut != null ? [`push_out=${pushOut}`] : []), // Note that correction volume is not supported in our public atomic liquid handling APIs ] - const python = `${pipettePythonName}.dispense(\n${indentPyLines( - pythonArgs.join(',\n') - )},\n)` + const python = `${pipettePythonName}.dispense(${pythonArgs.join(', ')})` if (errors.length > 0) { return {