Skip to content

Commit 46d0a75

Browse files
rebase w hw control stuff
1 parent 02d4d1c commit 46d0a75

File tree

3 files changed

+16
-21
lines changed

3 files changed

+16
-21
lines changed

api/src/opentrons/protocol_engine/execution/pipetting.py

+15-17
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,13 @@ async def aspirate_while_tracking(
191191
raise InvalidLiquidHeightFound(
192192
"Aspirate distance must be a float in Hardware pipetting handler."
193193
)
194-
# uncomment this when hw control pr gets merged
195-
# with self._set_flow_rate(pipette=hw_pipette, aspirate_flow_rate=flow_rate):
196-
# await self._hardware_api.aspirate_while_tracking(
197-
# mount=hw_pipette.mount,
198-
# z_distance=aspirate_z_distance,
199-
# flow_rate=flow_rate,
200-
# volume=adjusted_volume,
201-
# )
194+
with self._set_flow_rate(pipette=hw_pipette, aspirate_flow_rate=flow_rate):
195+
await self._hardware_api.aspirate_while_tracking(
196+
mount=hw_pipette.mount,
197+
z_distance=aspirate_z_distance,
198+
flow_rate=flow_rate,
199+
volume=adjusted_volume,
200+
)
202201
return adjusted_volume
203202

204203
async def dispense_while_tracking(
@@ -226,15 +225,14 @@ async def dispense_while_tracking(
226225
raise InvalidLiquidHeightFound(
227226
"Dispense distance must be a float in Hardware pipetting handler."
228227
)
229-
# uncomment this when hw control pr gets merged
230-
# with self._set_flow_rate(pipette=hw_pipette, dispense_flow_rate=flow_rate):
231-
# await self._hardware_api.dispense_while_tracking(
232-
# mount=hw_pipette.mount,
233-
# z_distance=dispense_z_distance,
234-
# flow_rate=flow_rate,
235-
# volume=adjusted_volume,
236-
# push_out=push_out,
237-
# )
228+
with self._set_flow_rate(pipette=hw_pipette, dispense_flow_rate=flow_rate):
229+
await self._hardware_api.dispense_while_tracking(
230+
mount=hw_pipette.mount,
231+
z_distance=dispense_z_distance,
232+
flow_rate=flow_rate,
233+
volume=adjusted_volume,
234+
push_out=push_out,
235+
)
238236
return adjusted_volume
239237

240238
async def aspirate_in_place(

api/tests/opentrons/protocol_engine/commands/test_aspirate_while_tracking.py

-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
import pytest
66
from decoy import Decoy, matchers
7-
from mock import AsyncMock, patch
8-
from typing import Iterator
97

108
from opentrons_shared_data.errors.exceptions import PipetteOverpressureError
119

@@ -17,7 +15,6 @@
1715
GantryMover,
1816
MovementHandler,
1917
)
20-
from opentrons.protocol_engine.commands.movement_common import move_to_well
2118
from opentrons.protocol_engine.commands.aspirate_while_tracking import (
2219
AspirateWhileTrackingParams,
2320
AspirateWhileTrackingResult,
@@ -39,7 +36,6 @@
3936
WellOrigin,
4037
WellOffset,
4138
DeckPoint,
42-
WellLocation,
4339
)
4440
from opentrons.protocol_engine.state import update_types
4541

api/tests/opentrons/protocol_engine/state/test_geometry_view.py

+1
Original file line numberDiff line numberDiff line change
@@ -4307,6 +4307,7 @@ def test_get_liquid_handling_z_change(
43074307
mock_labware_view: LabwareView,
43084308
mock_well_view: WellView,
43094309
) -> None:
4310+
"""Test for get_liquid_handling_z_change math."""
43104311
decoy.when(mock_labware_view.get_well_definition("labware-id", "A1")).then_return(
43114312
RectangularWellDefinition3.model_construct(totalLiquidVolume=1100000) # type: ignore[call-arg]
43124313
)

0 commit comments

Comments
 (0)