Skip to content

Commit

Permalink
need to round the plunger pos result
Browse files Browse the repository at this point in the history
  • Loading branch information
sanni-t committed Jan 24, 2025
1 parent de638e6 commit 3142b04
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -509,11 +509,12 @@ def plunger_position(
correction_volume: float = 0.0,
) -> float:
if ul == 0:
return instr.plunger_positions.bottom
multiplier = 1.0 + (correction_volume / ul)
mm_dist_from_bottom = ul / instr.ul_per_mm(ul, action)
mm_dist_from_bottom_corrected = mm_dist_from_bottom * multiplier
position = instr.plunger_positions.bottom - mm_dist_from_bottom_corrected
position = instr.plunger_positions.bottom
else:
multiplier = 1.0 + (correction_volume / ul)
mm_dist_from_bottom = ul / instr.ul_per_mm(ul, action)
mm_dist_from_bottom_corrected = mm_dist_from_bottom * multiplier
position = instr.plunger_positions.bottom - mm_dist_from_bottom_corrected
return round(position, 6)

def plunger_speed(
Expand Down

0 comments on commit 3142b04

Please sign in to comment.