Follows the rename of AP_ADSB_uAvionix_MAVLink to AP_ADSB_MAVLink and of
HAL_ADSB_UAVIONIX_MAVLINK_ENABLED to HAL_ADSB_MAVLINK_ENABLED.
Spelled ADSB_MAVLINK rather than ADSB_MAVLink to match the options either
side of it - ADSB_SAGETECH, ADSB_SAGETECH_MXS and ADSB_UAVIONX_UCP.
Note this changes a user-visible option name: --disable-ADSB_UAVIONIX now
fails with waf's "no such option" rather than silently building a feature
the user asked to leave out.
test scripts / build (astyle-cleanliness) (push) Canceled after 0s
test scripts / build (check_autotest_options) (push) Canceled after 0s
test scripts / build (logger_metadata) (push) Canceled after 0s
test scripts / build (param-file-validation) (push) Canceled after 0s
test scripts / build (param_parse) (push) Canceled after 0s
test scripts / build (python-cleanliness) (push) Canceled after 0s
test scripts / build (shellcheck) (push) Canceled after 0s
test scripts / build (validate_board_list) (push) Canceled after 0s
this makes "./waf XXX --upload" on linux smarter by selecting the
right USB device based on the information in the APJ file. When there
is only one candidate USB device it behaves as it does now, but when
there is more than one it selects based on board name and USB ID.
This stops the annoying reboot of all of your other flight controllers
of different types on USB when working on just one of them.
check_branch_conventions.py used a static 'AP_Compass:' example when a
commit message subject had no subsystem prefix. Add
BuildScriptBase.subsystem_for_commit(), which resolves a commit's changed
files through allowed_subsystems.py and returns the subsystem they share,
and name that subsystem in the suggestion instead. Fall back to the
static example when the files do not resolve to one subsystem.
Also reword the message so it is clear the missing prefix is on the git
commit message, not on the pull request title, and say how to amend it.
Working out the blacklist parses every ChibiOS hwdef, which takes a
third of a second, and both build_boards.py and
size_compare_branches.py did it while starting up whether or not the
run would build a bootloader.
Make it a property filled in on first use. All three places which
consult it already do so only for the bootloader vehicle, so a run
which does not build one now never parses a hwdef for this.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A board which takes another board's bootloader says so in its own
hwdef, so there is no need to name it in the blacklist as well; 23 of
the 42 entries were doing that, and each new such board had to be
added here by hand.
Read the directive with board_list's hwdef_for_board() rather than by
matching the hwdef text, so that undefs, overrides and includes are
handled the way the build handles them. This became affordable when
hwdef processing got faster: parsing all 443 ChibiOS hwdefs takes
0.33s, against the minutes or hours of building which follow.
Note that this deliberately does not treat a missing hwdef-bl.dat as
meaning a board has no bootloader. A board which needs one but is
missing one must fail, not be silently skipped, so those boards stay
listed explicitly.
The returned set is unchanged: 89 boards, the same 89 as before.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The loop which blacklists boards by HAL predates the addition of the
QURT HAL, so ModalAI-VOXL2 and ModalAI-VOXL3 were neither excluded by
HAL nor named in the explicit blacklist. A bootloader build task was
therefore generated for them, which fails; QURT has no bootloader and
no hwdef-bl.dat.
No QURT board was named in the explicit blacklist, so nothing is
removed from there.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
canzero and t3-gem-o1 are AP_HAL_Linux boards, not ChibiOS boards, so
they are already added to the bootloader blacklist by the loop which
excludes every board whose hal is Linux, ESP32 or SITL.
No functional change; the returned set is unchanged.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
libraries/<HAL>/hwdef/... changes were being tagged with the HAL library
name (e.g. AP_HAL_ChibiOS) since it was listed before hwdef as a
candidate subsystem, and an already-declared HAL name was treated as
valid and left alone. Make hwdef -- the deepest directory in the path --
the canonical tag in both cases, since it applies uniformly across
every HAL rather than being tied to one library.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
test scripts / build (astyle-cleanliness) (push) Canceled after 0s
test scripts / build (check_autotest_options) (push) Canceled after 0s
test scripts / build (logger_metadata) (push) Canceled after 0s
test scripts / build (param-file-validation) (push) Canceled after 0s
test scripts / build (param_parse) (push) Canceled after 0s
test scripts / build (python-cleanliness) (push) Canceled after 0s
test scripts / build (shellcheck) (push) Canceled after 0s
test scripts / build (validate_board_list) (push) Canceled after 0s
size_compare_branches wrote its progress CSV to the hardcoded path
/tmp/some.csv; make the destination a command-line option, and write
no progress file at all when the option is not given. The write
helper lives in the shared base class, and build_boards gains the
same option, writing task counts, remaining tasks and failures as
builds complete (in both parallel and sequential modes).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Some editors strip the final newline by default, which shows up as
"No newline at end of file" noise in GitHub review. Fail the branch
conventions check when a PR adds a source file without a trailing
newline or removes one from a file which had it. Pre-existing
violations do not block unrelated edits.
Detect LSM6DSV32X separately from LSM6DSV16X using the CTRL8 variant bit,
as both parts share the same WHO_AM_I value.
Detect LSM6DSK320X using its WHO_AM_I value, register both new variants
with dedicated device types, and use the correct accel/gyro full-scale
register encodings for each variant.
Update decode_devid.py so INS device IDs decode to the new variant names.
Add check_commit_subsystems() to check_branch_conventions.py, which uses
the allowed_subsystems library to verify, for every commit on the branch,
that:
- the declared subsystem prefix is an allowed subsystem (a libraries/
directory, a directory the commit creates, or a curated extra), and
- every file changed in the commit belongs to that subsystem.
When a file does not belong to the declared subsystem the error lists the
subsystem(s) it could be part of; when the prefix itself is unknown the
error suggests the closest allowed name ("did you mean ...?"). Revert and
fixup! commits are skipped (handled by the existing checks). This runs in
the existing test_branch_conventions.yml workflow; no CI configuration
change is required.
The generic git helpers get_added_paths_for_commit() and
created_library_dirs() live on BuildScriptBase so other build scripts can
reuse them. Register allowed_subsystems as a known-first-party module in
pyproject.toml so the new import sorts correctly under ruff/isort.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add Tools/scripts/allowed_subsystems.py, the single source of truth for
which subsystem prefixes are permitted in commit messages and which
subsystem(s) a changed file may belong to.
A subsystem is allowed if it is a directory under libraries/ (computed
dynamically), a libraries/ directory created by the commit itself, or one
of the curated non-library extras (vehicles, Tools, autotest, waf, hwdef,
modules, a few common class prefixes, ...). subsystems_for_path() returns
an ordered list of candidate subsystems for a path, since some files are
conventionally committed under more than one name (an autotest under
autotest or Tools; a ChibiOS hwdef file under hwdef or AP_HAL_ChibiOS).
suggest_subsystem() offers the closest allowed name for a mistyped prefix.
The functionality is exposed as an AllowedSubsystems object; running the
file directly prints every valid subsystem name. It is consumed by
check_branch_conventions.py, the git-subsystems-split tool and the sample
pre-commit hook.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
serial_protocol_compiled_in() in
AP_SerialManager_default_protocol_check.cpp gates each serial port default
protocol against the feature that provides it, but falls through to "true"
for any protocol it does not name -- so a protocol added to the enum without
a term there is silently treated as always-compiled-in, defeating the check
for that protocol. Nothing in the C++ can notice that omission.
Add check_serial_protocol_gates.py, which parses the SerialProtocol
enumerators from AP_SerialManager.h and the protocols named by
serial_protocol_compiled_in(), and requires every enumerator to be either
gated there or listed in an explicit UNGATED register (with the reason). A
new protocol in neither, or a stale name in the C++/register, is an error.
The register also makes visible the protocols that have a feature but are not
yet gated (GPS, Rangefinder, AirSpeed, AHRS, ...); gating those is a
behaviour-neutral follow-up.
Run it from pre-commit when the header, the check, or the script changes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The serial default-protocol checks are off by default. test_new_boards.py
enables them (via --extra-hwdef) when building newly-added boards, so a board
cannot pin a serial port default to a protocol it does not compile in.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
test_new_boards.py now checks that any branch adding a new hwdef-bl.dat
also commits the matching prebuilt bootloader binary at
Tools/bootloaders/<board>_bl.bin, mirroring the build-time requirement.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Generate a static, fully-offline HTML site from a build_binaries history
SQLite database (as produced by build_binaries_history.py). Intended to be
run periodically; each run regenerates the whole tree. Pages are
self-contained (chart data inlined, uPlot vendored locally), so the output
opens directly from local disk with no database or network access.
Pages:
- Coverage (the landing page): board x vehicle status at the most recent
COMPLETED latest-tag run, split into boards with/without failures.
- Build trends: per-board grid, one box per run (newest left) linking to its
commit, recently-failing boards first; a "completed" row marks finished vs
partial runs; an optional checkbox interleaves the git commits we did not
build (rendered on demand).
- Flash free: per vehicle/board program-flash headroom (region computed via
the ChibiOS HWDef system), tightest first, low-headroom flagged.
- Runs: run duration, boards per run, builds per run, and commits since the
previous run.
- Overview dashboard, plus per-board detail pages (flash-free and build-
duration history and notable size changes). Chart points link to the commit.
Lives in its own subdirectory with a README onboarding guide (architecture,
data flow, the inlined-data contract, how to extend, and dev gotchas).
Written with AI assistance.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
LIS2MDL and IIS2MDC are the same ST silicon with identical register
maps, WHO_AM_I, I2C address and sensitivity. Remove the separate
LIS2MDL driver entirely and switch boards that referenced it to IIS2MDC.
AIRBRAINH743 COMPASS line changed from LIS2MDL to IIS2MDC.