Skip to content

Commit 3142b04

Browse files
committed
need to round the plunger pos result
1 parent de638e6 commit 3142b04

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

api/src/opentrons/hardware_control/instruments/ot3/pipette_handler.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -509,11 +509,12 @@ def plunger_position(
509509
correction_volume: float = 0.0,
510510
) -> float:
511511
if ul == 0:
512-
return instr.plunger_positions.bottom
513-
multiplier = 1.0 + (correction_volume / ul)
514-
mm_dist_from_bottom = ul / instr.ul_per_mm(ul, action)
515-
mm_dist_from_bottom_corrected = mm_dist_from_bottom * multiplier
516-
position = instr.plunger_positions.bottom - mm_dist_from_bottom_corrected
512+
position = instr.plunger_positions.bottom
513+
else:
514+
multiplier = 1.0 + (correction_volume / ul)
515+
mm_dist_from_bottom = ul / instr.ul_per_mm(ul, action)
516+
mm_dist_from_bottom_corrected = mm_dist_from_bottom * multiplier
517+
position = instr.plunger_positions.bottom - mm_dist_from_bottom_corrected
517518
return round(position, 6)
518519

519520
def plunger_speed(

0 commit comments

Comments
 (0)