Skip to content

Commit

Permalink
fixes calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
andySigler committed Jul 16, 2024
1 parent 81dd0c5 commit 1f0af4b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2655,15 +2655,16 @@ async def liquid_probe(
probe_start_pos = await self.gantry_position(checked_mount, refresh=True)

# plunger travel distance is from TOP->BOTTOM (minus the backlash distance + impulse)
# FIXME: logic for how plunger moves is divided between here and tool_sensors.py
p_impulse_mm = (
probe_settings.plunger_impulse_time * probe_settings.plunger_speed
)
p_total_mm = (
instrument.plunger_positions.bottom - instrument.plunger_positions.top
)
p_working_mm = p_total_mm - (instrument.backlash_distance - p_impulse_mm)
p_working_mm = p_total_mm - (instrument.backlash_distance + p_impulse_mm)

# NOTE: (sigler) the 0.5 seconds is indeed a magic number, edit carefully.
# NOTE: (sigler) Here lye some magic numbers.
# The Z axis probing motion uses the first 20 samples to calculate
# a baseline for all following samples, making the very beginning of
# that Z motion unable to detect liquid. The sensor is configured for
Expand Down

0 comments on commit 1f0af4b

Please sign in to comment.