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): Lld end z retract position bug #15960

Merged
merged 3 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
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
fix lld bug
  • Loading branch information
ryanthecoder committed Aug 9, 2024
commit cc43f5b616be798dcb3b04f5c0a947890906ffec
15 changes: 12 additions & 3 deletions api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2629,7 +2629,7 @@ async def _liquid_probe_pass(
force_both_sensors: bool = False,
) -> float:
plunger_direction = -1 if probe_settings.aspirate_while_sensing else 1
await self._backend.liquid_probe(
end_z = await self._backend.liquid_probe(
mount,
p_travel,
probe_settings.mount_speed,
Expand All @@ -2641,8 +2641,17 @@ async def _liquid_probe_pass(
probe=probe,
force_both_sensors=force_both_sensors,
)
end_pos = await self.gantry_position(mount, refresh=True)
return end_pos.z
machine_pos = await self._backend.update_position()
machine_pos[Axis.by_mount(mount)] = end_z
deck_end_z = self._deck_from_machine(machine_pos)[Axis.by_mount(mount)]
offset = offset_for_mount(
mount,
top_types.Point(*self._config.left_mount_offset),
top_types.Point(*self._config.right_mount_offset),
top_types.Point(*self._config.gripper_mount_offset),
)
cp = self.critical_point_for(mount, None)
return deck_end_z + offset[2] + cp.z
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: I think offset.z is a little clearer


async def liquid_probe(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ async def run_sync_buffer_to_csv(
),
expected_nodes=[tool],
)
if raise_z is not None and False:
if raise_z is not None:
# if probing is finished, move the head node back up before requesting the data buffer
if positions[head_node].move_ack == MoveCompleteAck.stopped_by_condition:
await raise_z.run(can_messenger=messenger)
Expand Down