Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): preserve last_moved in retract #14592

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,24 +1306,25 @@ async def _cache_and_maybe_retract_mount(self, mount: OT3Mount) -> None:
Disengage the 96-channel and gripper mount if retracted. Re-engage
the 96-channel or gripper mount if it is about to move.
"""
last_moved = self._last_moved_mount
if self.is_idle_mount(mount):
# home the left/gripper mount if it is current disengaged
await self.home_z(mount)

if mount != self._last_moved_mount and self._last_moved_mount:
await self.retract(self._last_moved_mount, 10)
if mount != last_moved and last_moved:
await self.retract(last_moved, 10)

# disengage Axis.Z_L motor and engage the brake to lower power
# consumption and reduce the chance of the 96-channel pipette dropping
if (
self.gantry_load == GantryLoad.HIGH_THROUGHPUT
and self._last_moved_mount == OT3Mount.LEFT
and last_moved == OT3Mount.LEFT
):
await self.disengage_axes([Axis.Z_L])

# disegnage Axis.Z_G when we can to reduce the chance of
# the gripper dropping
if self._last_moved_mount == OT3Mount.GRIPPER:
if last_moved == OT3Mount.GRIPPER:
await self.disengage_axes([Axis.Z_G])

if mount != OT3Mount.GRIPPER:
Expand Down
Loading