Skip to content

Commit eb1edca

Browse files
authored
fix(api): current volume calculation in hardware controller (#18528)
Closes AUTH-1952 # Overview When calculating current pipette volumes following liquid handling commands, the hardware controller does floating point math. This was resulting in small python-specific floating point errors which were essentially negligible in all practical sense but were causing `==` comparisons to fail. For the specific bug reported above, this floating point error was making the pipette's `current_volume` to be a value that's 'very close to' zero, but not zero, after doing a full dispense. This was preventing the harware controller from properly executing a `prepare_for_aspirate()` as it needs the current volume to be `0`. So, this PR prevents the bug from happening by making sure that the final pipette volume after a full dispense gets saved as `0uL` ## Risk assessment Low- bug fix only
1 parent dc67def commit eb1edca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ def plan_check_dispense(
665665
return None
666666

667667
if is_full_dispense:
668+
disp_vol = instrument.current_volume
668669
if push_out is None:
669670
push_out_ul = instrument.push_out_volume
670671
else:

0 commit comments

Comments
 (0)