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

feat(api): add retract_axis to OT-2 and FLEX hardware-control api #13001

Merged
merged 6 commits into from
Jul 7, 2023
Merged
Changes from 1 commit
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
Next Next commit
refactor retract method
ahiuchingau committed Jun 27, 2023
commit 37e61c2b9633c2f51f0cbc50eb8cbfb719dd3052
10 changes: 9 additions & 1 deletion api/src/opentrons/hardware_control/api.py
Original file line number Diff line number Diff line change
@@ -844,7 +844,15 @@ async def retract(self, mount: top_types.Mount, margin: float = 10) -> None:

Works regardless of critical point or home status.
"""
smoothie_ax = (Axis.by_mount(mount).name.upper(),)
await self.retract_axis(Axis.by_mount(mount), margin)

@ExecutionManagerProvider.wait_for_running
async def retract_axis(self, axis: Axis, margin: float = 10) -> None:
"""Pull the specified axis up to its home position.

Works regardless of critical point or home status.
"""
smoothie_ax = (axis.name.upper(),)

async with self._motion_lock:
smoothie_pos = await self._fast_home(smoothie_ax, margin)