Skip to content

Map registry PIDs to PX4 boards and check them against PX4 - #8

Merged
mrpollo merged 3 commits into
mainfrom
px4-board-contract
Sep 28, 2026
Merged

mrpollo merged 3 commits into
mainfrom
px4-board-contract

Conversation

@mrpollo

@mrpollo mrpollo commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

This makes the registry map exactly to PX4-Autopilot boards and adds CI that fails when the two disagree. Each PID entry can now carry px4_board, the <vendor>/<board> directory under PX4's boards/ that ships it. The five PIDs that are upstream today (px4/fmu-v6xrt, zeroone/x6, agam/fmu-v6xrt, siyi/n7, siyi/unifc-6-pico) are mapped; NewBeeDrone, Syro, Agam MegH7 and Droneer are not in PX4 yet and stay unmapped.

validate.py checks the new field structurally: px4_board must sit inside the manufacturer's px4_vendor and be unique. The new check_px4.py compares the registry to a PX4 checkout in both directions. Every defconfig under a mapped board that sets VID 0x3643 must set that entry's PID, and every PX4 defconfig using VID 0x3643 must be claimed by some px4_board, so a registry edit that orphans an upstream board fails here the same way PX4's own check fails on its side. The contract is only the VID/PID mapping. A px4_board whose directory is not in PX4 yet only prints a notice, so a registry entry can land before its board PR without deadlocking the two repos. A PX4 path with no boards/ directory, or with no defconfig on VID 0x3643, is an error, so an empty checkout cannot pass silently. CI sparse-clones PX4 main (boards/ only) on every PR and push, plus a weekly schedule and manual dispatch to catch drift from the PX4 side.

Checked locally against current PX4 main: registry valid, 10 defconfigs across 5 mapped boards, 0 errors. Swapping the two SIYI px4_board values and dropping agam's px4_board each fail; mapping a board directory not yet in PX4 is a notice with exit 0; an empty directory as the PX4 path fails.

Add px4_board on PID entries and usb_vendor_string on manufacturers,
and a check_px4.py cross-check against a PX4-Autopilot checkout that CI
runs on every PR, push, and weekly.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
The registry maps PIDs to PX4 boards so members can ship under the
Dronecode VID. It does not govern the USB vendor string, so remove the
usb_vendor_string field and stop comparing CONFIG_CDCACM_VENDORSTR in
check_px4.py. The contract is now only that a board's defconfigs using
VID 0x3643 set the PID of the entry whose px4_board names that board,
and that every such board is mapped.

check_px4.py also fails when the PX4 path yields no defconfig on the
registry VID, instead of passing with nothing checked, and reports how
many defconfigs and mapped boards it checked.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
mrpollo added a commit to PX4/PX4-Autopilot that referenced this pull request Sep 28, 2026
The Dronecode USB ID registry maps Dronecode PIDs to PX4 board
directories so members can ship under the Dronecode VID. It does not
govern the USB vendor string, and the usb_vendor_string field is being
removed from it (Dronecode/usb-ids#8). Drop the CONFIG_CDCACM_VENDORSTR
rule; the checker now only requires a registered PID whose px4_board
matches the defconfig's boards/<vendor>/<board> directory.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
PX4 CI fails a board PR using VID 0x3643 unless its PID is already
mapped to the board's directory with px4_board on this repo's main, so
the registry entry has to merge first. The README and PR template said
the opposite (add px4_board once the board is upstream, or alongside
the board PR), and pointed at px4_vendor as what PX4 CI checks.

Add the step to the request process, map the example entry, and fix
both field descriptions and the PR template checklist.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
@mrpollo
mrpollo merged commit 054695f into main Sep 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant