-
Notifications
You must be signed in to change notification settings - Fork 179
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
refactor(api): only restore changed currents #13683
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -581,7 +581,7 @@ async def move_plunger_absolute_ot3( | |
if motor_current is None: | ||
await _move_coro | ||
else: | ||
async with api._backend.restore_current(): | ||
async with api._backend.motor_current(): | ||
await api._backend.set_active_current( | ||
{Axis.of_main_tool_actuator(mount): motor_current} # type: ignore[dict-item] | ||
) | ||
|
@@ -613,7 +613,7 @@ async def move_tip_motor_relative_ot3( | |
if motor_current is None: | ||
await _move_coro | ||
else: | ||
async with api._backend.restore_current(): | ||
async with api._backend.motor_current(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
await api._backend.set_active_current( | ||
{Axis.Q: motor_current} # type: ignore[dict-item] | ||
) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,7 +152,7 @@ async def _drop_tip(api: OT3API, trash: Point) -> None: | |
async def _partial_pick_up_z_motion( | ||
api: OT3API, current: float, distance: float, speed: float | ||
) -> None: | ||
async with api._backend.restore_current(): | ||
async with api._backend.motor_current(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
await api._backend.set_active_current({Axis.Z_L: current}) | ||
target_down = target_position_from_relative( | ||
OT3Mount.LEFT, Point(z=-distance), api._current_position | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -252,7 +252,7 @@ async def _force_gauge( | |
force_output = [] | ||
TH.start() | ||
try: | ||
async with api._backend.restore_current(): | ||
async with api._backend.motor_current(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
await api._backend.set_active_current({z_ax: test_current}) | ||
await api.move_to( | ||
mount=mount, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
set_active_current
call below should be merged into here