Skip to content

Commit

Permalink
feat(hardware, shared-data, api): Support LV 96 channel (#16747)
Browse files Browse the repository at this point in the history
<!--
Thanks for taking the time to open a Pull Request (PR)! Please make sure
you've read the "Opening Pull Requests" section of our Contributing
Guide:

https://github.com/Opentrons/opentrons/blob/edge/CONTRIBUTING.md#opening-pull-requests

GitHub provides robust markdown to format your PR. Links, diagrams,
pictures, and videos along with text formatting make it possible to
create a rich and informative PR. For more information on GitHub
markdown, see:

https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax

To ensure your code is reviewed quickly and thoroughly, please fill out
the sections below to the best of your ability!
-->

Add all of the string constants for the pipette type, and then update
some of the loading/checking of pipette types that were explicitly
checking only the 1000ul version of the 96.

<!--
Describe your PR at a high level. State acceptance criteria and how this
PR fits into other work. Link issues, PRs, and other relevant resources.
-->

<!--
Describe your testing of the PR. Emphasize testing not reflected in the
code. Attach protocols, logs, screenshots and any other assets that
support your testing.
-->

<!--
List changes introduced by this PR considering future developers and the
end user. Give careful thought and clear documentation to breaking
changes.
-->

<!--
- What do you need from reviewers to feel confident this PR is ready to
merge?
- Ask questions.
-->

<!--
- Indicate the level of attention this PR needs.
- Provide context to guide reviewers.
- Discuss trade-offs, coupling, and side effects.
- Look for the possibility, even if you think it's small, that your
change may affect some other part of the system.
- For instance, changing return tip behavior may also change the
behavior of labware calibration.
- How do your unit tests and on hands on testing mitigate this PR's
risks and the risk of future regressions?
- Especially in high risk PRs, explain how you know your testing is
enough.
-->
  • Loading branch information
ryanthecoder committed Nov 14, 2024
1 parent bb8bf39 commit 63c1d18
Show file tree
Hide file tree
Showing 11 changed files with 9,955 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,7 @@ def _lookup_serial_key(pipette_name: FirmwarePipetteName) -> str:
FirmwarePipetteName.p50_multi: "P50M",
FirmwarePipetteName.p1000_96: "P1KH",
FirmwarePipetteName.p50_96: "P50H",
FirmwarePipetteName.p200_96: "P2HH",
}
return lookup_name[pipette_name]

Expand Down
5 changes: 4 additions & 1 deletion api/src/opentrons/protocol_api/protocol_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,10 @@ def load_instrument(
mount, checked_instrument_name
)

is_96_channel = checked_instrument_name == PipetteNameType.P1000_96
is_96_channel = checked_instrument_name in [
PipetteNameType.P1000_96,
PipetteNameType.P200_96,
]

tip_racks = tip_racks or []

Expand Down
3 changes: 2 additions & 1 deletion api/src/opentrons/protocol_api/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"flex_1channel_1000": PipetteNameType.P1000_SINGLE_FLEX,
"flex_8channel_1000": PipetteNameType.P1000_MULTI_FLEX,
"flex_96channel_1000": PipetteNameType.P1000_96,
"flex_96channel_200": PipetteNameType.P200_96,
}


Expand Down Expand Up @@ -92,7 +93,7 @@ def ensure_mount_for_pipette(
mount: Union[str, Mount, None], pipette: PipetteNameType
) -> Mount:
"""Ensure that an input value represents a valid mount, and is valid for the given pipette."""
if pipette == PipetteNameType.P1000_96:
if pipette in [PipetteNameType.P1000_96, PipetteNameType.P200_96]:
# Always validate the raw mount input, even if the pipette is a 96-channel and we're not going
# to use the mount value.
if mount is not None:
Expand Down
1 change: 1 addition & 0 deletions hardware/opentrons_hardware/firmware_bindings/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ class PipetteName(int, Enum):
p50_multi = 0x03
p1000_96 = 0x04
p50_96 = 0x05
p200_96 = 0x06
unknown = 0xFFFF


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"P50M": PipetteName.p50_multi,
"P1KH": PipetteName.p1000_96,
"P50H": PipetteName.p50_96,
"P2HH": PipetteName.p200_96,
}

SERIAL_FORMAT_MSG = (
Expand Down
Loading

0 comments on commit 63c1d18

Please sign in to comment.