You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: add Raspberry Pi Pico 2 (RP2350) to supported devices - #1004
PID comes from arduino-pico boards.txt (rpipico2.pid.0). Detection matches on VID only, so other 2e8a devices will also match this entry.
SupportedDevice.__init__ now normalizes VID/PID (lower case, strips 0x, zero-pads to 4 digits), with a unit test in meshtastic/tests/test_supported_device.py.
Added Raspberry Pi Pico 2 support, with device detection available on Linux, macOS, and Windows using its USB identifiers.
Improvements
USB identifiers are now stored in a consistent format: uppercase letters are converted to lowercase, optional 0x prefixes are removed, and nonempty identifiers shorter than four characters are padded. Missing identifiers remain unchanged.
Detection is VID-only, so other 2e8a devices (BOOTSEL, Debug Probe 2e8a:000c) will also match; PID-based filtering could be a follow-up.
Not tested on hardware; PID from arduino-pico boards.txt (rpipico2.pid.0=0x000f).
Happy to follow up with pico / pico2w / seeed_xiao_rp2350 entries in separate PRs.
No actionable comments were generated in the recent review.
Walkthrough
SupportedDevice now normalizes nonempty USB IDs. The supported-device collection now includes Raspberry Pi Pico 2 metadata, with tests for USB ID normalization and vendor ID lookup.
Changes: Raspberry Pi Pico 2 support
Layer / File(s)
Summary
Normalize USB IDs meshtastic/supported_device.py, meshtastic/tests/test_supported_device.py
SupportedDevice strips whitespace, converts nonempty USB IDs to lowercase, removes a leading 0x, and zero-pads them to four characters. The test checks normalized values and confirms that an omitted vendor ID remains None.
Define and register the Pico 2 meshtastic/supported_device.py, meshtastic/tests/test_util.py
Adds the pico2 device definition with its firmware identifier, device class, platform serial-port prefixes, and USB IDs. Adds it to supported_devices. The test checks vendor ID lookup, inclusion in the unique vendor ID list, and the firmware identifier.
The change adds Pico 2 registration and consistent USB-ID formatting without an identified behavioral regression. It is mergeable subject to normal checks.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Linked Issues check
Directly linked issue #973 is open and active. The PR implements the Pico 2 entry, appends pico2 to supported_devices, uses cu.usbmodem, and normalizes USB IDs. The tests cover normalization and…
Implement the remaining docstring and comment changes requested by #973 in meshtastic/supported_device.py, including the French-to-English change if the target comment exists. Then update the PR description if the issue scope changes.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely identifies the main change: adding Raspberry Pi Pico 2 with RP2350 support to the supported devices.
Out of Scope Changes check
The changed files support issue #973. meshtastic/supported_device.py adds the Pico 2 declaration, appends it to supported_devices, and normalizes USB IDs. The two test changes verify normalization…
Docstring Coverage
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Out of Scope Changes check
Explanation
The changed files support issue #973. meshtastic/supported_device.py adds the Pico 2 declaration, appends it to supported_devices, and normalizes USB IDs. The two test changes verify normalization and Pico 2 vendor lookup. Whitespace removal, 0x removal, and zero-padding are related normalization behavior and are described by the PR.
Full details: Docstring Coverage
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 3 files.
Full details: Linked Issues check
Explanation
Directly linked issue #973 is open and active. The PR implements the Pico 2 entry, appends pico2 to supported_devices, uses cu.usbmodem, and normalizes USB IDs. The tests cover normalization and Pico 2 vendor lookup. The requested docstring and comment improvements remain omitted. The PR description confirms this omission.
Resolution
Implement the remaining docstring and comment changes requested by #973 in meshtastic/supported_device.py, including the French-to-English change if the target comment exists. Then update the PR description if the issue scope changes.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between 6171d71 and 08f8c4d.
Files selected for processing: 1
meshtastic/tests/test_util.py
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pico2SupportedDeviceentry (Raspberry Pi Pico 2,rp2350, VID2e8a/ PID000f) and appends it tosupported_devices. Closes SupportedDevice : pico_2_rp2350 SupportedDevice #973.boards.txt(rpipico2.pid.0). Detection matches on VID only, so other2e8adevices will also match this entry.SupportedDevice.__init__now normalizes VID/PID (lower case, strips0x, zero-pads to 4 digits), with a unit test inmeshtastic/tests/test_supported_device.py.Summary by CodeRabbit
0xprefixes are removed, and nonempty identifiers shorter than four characters are padded. Missing identifiers remain unchanged.