diff --git a/api/src/opentrons/protocol_engine/execution/movement.py b/api/src/opentrons/protocol_engine/execution/movement.py index 6424226fcf9..b5e3c5aeeac 100644 --- a/api/src/opentrons/protocol_engine/execution/movement.py +++ b/api/src/opentrons/protocol_engine/execution/movement.py @@ -138,7 +138,7 @@ async def move_to_well( force_direct=force_direct, minimum_z_height=minimum_z_height, operation_volume=operation_volume, - is_tracking=is_tracking + is_tracking=is_tracking, ) speed = self._state_store.pipettes.get_movement_speed( diff --git a/api/src/opentrons/protocol_engine/execution/pipetting.py b/api/src/opentrons/protocol_engine/execution/pipetting.py index cada272db5b..a64cd8b0141 100644 --- a/api/src/opentrons/protocol_engine/execution/pipetting.py +++ b/api/src/opentrons/protocol_engine/execution/pipetting.py @@ -178,13 +178,13 @@ async def aspirate_while_tracking( aspirate_z_distance = self._state_view.geometry.get_liquid_handling_z_change( labware_id=labware_id, - well_name=well_name, # make sure the protocol engine actually has the well name atp ? - operation_volume=volume * -1, # try this tomorrow + well_name=well_name, + operation_volume=volume * -1, ) with self._set_flow_rate(pipette=hw_pipette, aspirate_flow_rate=flow_rate): await self._hardware_api.aspirate_while_tracking( mount=hw_pipette.mount, - z_distance=aspirate_z_distance * -1, + z_distance=aspirate_z_distance, flow_rate=flow_rate, volume=adjusted_volume, ) @@ -210,13 +210,13 @@ async def dispense_while_tracking( dispense_z_distance = self._state_view.geometry.get_liquid_handling_z_change( labware_id=labware_id, - well_name=well_name, # make sure the protocol engine actually has the well name atp ? + well_name=well_name, operation_volume=volume, ) with self._set_flow_rate(pipette=hw_pipette, dispense_flow_rate=flow_rate): await self._hardware_api.dispense_while_tracking( mount=hw_pipette.mount, - z_distance=(dispense_z_distance * -1), + z_distance=dispense_z_distance, flow_rate=flow_rate, volume=adjusted_volume, push_out=push_out, diff --git a/api/src/opentrons/protocol_engine/state/frustum_helpers.py b/api/src/opentrons/protocol_engine/state/frustum_helpers.py index f59f3fb430e..11dbc1f0588 100644 --- a/api/src/opentrons/protocol_engine/state/frustum_helpers.py +++ b/api/src/opentrons/protocol_engine/state/frustum_helpers.py @@ -423,7 +423,9 @@ def find_height_at_well_volume( volumetric_capacity = get_well_volumetric_capacity(well_geometry) max_volume = sum(row[1] for row in volumetric_capacity) if target_volume < 0 or target_volume > max_volume: - raise InvalidLiquidHeightFound(f"Invalid target volume {target_volume}, max vol {max_volume}.") + raise InvalidLiquidHeightFound( + f"Invalid target volume {target_volume}, max vol {max_volume}." + ) sorted_well = sorted(well_geometry.sections, key=lambda section: section.topHeight) # find the section the target volume is in and compute the height diff --git a/api/src/opentrons/protocol_engine/state/geometry.py b/api/src/opentrons/protocol_engine/state/geometry.py index 05cdbbe323b..d3633044e31 100644 --- a/api/src/opentrons/protocol_engine/state/geometry.py +++ b/api/src/opentrons/protocol_engine/state/geometry.py @@ -1,6 +1,7 @@ """Geometry state getters.""" import enum + # import logging from numpy import array, dot, double as npdouble from numpy.typing import NDArray @@ -1423,9 +1424,7 @@ def get_liquid_handling_z_change( initial_height=initial_handling_height, volume=operation_volume, ) - # uncomment this - # return final_height - initial_handling_height - return initial_handling_height - final_height + return final_height - initial_handling_height def get_well_offset_adjustment( self,