Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): Aspirate, dispense, and mix can perform at 0ul #13989

Merged
merged 5 commits into from
Nov 16, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions api/src/opentrons/protocol_api/instrument_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ def aspirate(
reject_adapter=self.api_version >= APIVersion(2, 15),
)

c_vol = self._core.get_available_volume() if not volume else volume
if self.api_version >= APIVersion(2, 16):
assume_volume = bool(volume is None)
else:
assume_volume = bool(not volume)
c_vol = self._core.get_available_volume() if assume_volume else volume
flow_rate = self._core.get_aspirate_flow_rate(rate)

with publisher.publish_context(
Expand Down Expand Up @@ -363,7 +367,11 @@ def dispense(
reject_adapter=self.api_version >= APIVersion(2, 15),
)

c_vol = self._core.get_current_volume() if not volume else volume
if self.api_version >= APIVersion(2, 16):
assume_volume = bool(volume is None)
else:
assume_volume = bool(not volume)
c_vol = self._core.get_current_volume() if assume_volume else volume

flow_rate = self._core.get_dispense_flow_rate(rate)

Expand Down Expand Up @@ -433,7 +441,11 @@ def mix(
if not self._core.has_tip():
raise UnexpectedTipRemovalError("mix", self.name, self.mount)

c_vol = self._core.get_available_volume() if not volume else volume
if self.api_version >= APIVersion(2, 16):
assume_volume = bool(volume is None)
else:
assume_volume = bool(not volume)
c_vol = self._core.get_available_volume() if assume_volume else volume

with publisher.publish_context(
broker=self.broker,
Expand Down