Skip to content

Commit

Permalink
make the logic a little clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Aug 2, 2024
1 parent 316a81d commit c17f68d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2718,9 +2718,7 @@ async def liquid_probe(
# probe_start_pos.z + z_distance of pass - pos.z should be < max_z_dist
# due to rounding errors this can get caught in an infinite loop when the distance is almost equal
# so we check to see if they're within 0.01 which is 1/5th the minimum movement distance from move_utils.py
while (probe_start_pos.z - pos.z) < max_z_dist and not isclose(
(probe_start_pos.z - pos.z), max_z_dist, rel_tol=0.01
):
while (probe_start_pos.z - pos.z) < (max_z_dist + 0.01):
# safe distance so we don't accidentally aspirate liquid if we're already close to liquid
safe_plunger_pos = top_types.Point(
pos.x, pos.y, pos.z + probe_safe_reset_mm
Expand Down

0 comments on commit c17f68d

Please sign in to comment.