Skip to content

Commit

Permalink
change em pipette to high speed pipette
Browse files Browse the repository at this point in the history
  • Loading branch information
caila-marashaj committed Nov 26, 2024
1 parent 6b2da73 commit 0b01e2f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def update_constraints_for_plunger_acceleration(
mount: OT3Mount,
acceleration: float,
gantry_load: GantryLoad,
em_pipette: bool = False,
high_speed_pipette: bool = False,
) -> None:
...

Expand Down
4 changes: 2 additions & 2 deletions api/src/opentrons/hardware_control/backends/ot3controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,14 +415,14 @@ def update_constraints_for_plunger_acceleration(
mount: OT3Mount,
acceleration: float,
gantry_load: GantryLoad,
em_pipette: bool = False,
high_speed_pipette: bool = False,
) -> None:
new_constraints = get_system_constraints_for_plunger_acceleration(
self._configuration.motion_settings,
gantry_load,
mount,
acceleration,
em_pipette,
high_speed_pipette,
)
self._move_manager.update_constraints(new_constraints)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def update_constraints_for_plunger_acceleration(
mount: OT3Mount,
acceleration: float,
gantry_load: GantryLoad,
em_pipette: bool = False,
high_speed_pipette: bool = False,
) -> None:
self._sim_gantry_load = gantry_load

Expand Down
4 changes: 2 additions & 2 deletions api/src/opentrons/hardware_control/backends/ot3utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,14 @@ def get_system_constraints_for_plunger_acceleration(
gantry_load: GantryLoad,
mount: OT3Mount,
acceleration: float,
em_pipette: bool = False,
high_speed_pipette: bool = False,
) -> "SystemConstraints[Axis]":
old_constraints = config.by_gantry_load(gantry_load)
new_constraints = {}
axis_kinds = set([k for _, v in old_constraints.items() for k in v.keys()])

def _get_axis_max_speed(ax: Axis) -> float:
if ax == Axis.of_main_tool_actuator(mount) and em_pipette:
if ax == Axis.of_main_tool_actuator(mount) and high_speed_pipette:
_max_speed = float(DEFAULT_EMULSIFYING_PIPETTE_AXIS_MAX_SPEED)
else:
_max_speed = old_constraints["default_max_speed"][axis_kind]
Expand Down
6 changes: 4 additions & 2 deletions api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,11 @@ async def set_system_constraints_for_calibration(self) -> None:
async def set_system_constraints_for_plunger_acceleration(
self, mount: OT3Mount, acceleration: float
) -> None:
em_pipette = self._pipette_handler.get_pipette(mount).is_high_speed_pipette()
high_speed_pipette = self._pipette_handler.get_pipette(
mount
).is_high_speed_pipette()
self._backend.update_constraints_for_plunger_acceleration(
mount, acceleration, self._gantry_load, em_pipette
mount, acceleration, self._gantry_load, high_speed_pipette
)

@contextlib.asynccontextmanager
Expand Down

0 comments on commit 0b01e2f

Please sign in to comment.