Renames and rescales the Copter and QuadPlane parameters that changed
name or units in 4.7 (attitude, position and waypoint controllers,
loiter, circle, RTL, land, pilot, rangefinder, MAV_ and stream rate
parameters), converts ARMING_CHECK to ARMING_SKIPCHK and moves the
MAVLink bits of SERIALn_OPTIONS into MAVn_OPTIONS. Files are converted
in place or into an output directory, --patch selects the 4.7.0 or 4.7.1
names and the vehicle is detected from the file content.
Move the parameter file parsing, rescaling and rewriting into importable
helpers so that other conversion scripts can reuse them. The standalone
interface is unchanged apart from a new --sig-digits option (default 3).
QGroundControl files are now handled, names are matched exactly instead
of by prefix, and separators, comments and untouched lines are preserved.
lcov 2.x, as shipped in the Ubuntu 24.04 CI containers, promotes two
conditions the weekly coverage run always hits from warnings to fatal
errors:
- "mismatched end line": two functions starting on the same source
line with different end lines. Every gtest TEST() body trips this,
as the macro also defines the fixture constructor and destructor on
the TEST() line, so both lcov --capture invocations abort.
- "unused": a --remove pattern which matched nothing; ".waf*" never
matches, so the pattern-removal step aborts.
Pass --ignore-errors for those classes on the affected invocations.
lcov 1.x rejects unknown error classes, so the arguments are only
emitted when lcov reports version 2 or later.
The size table marks a board "*" when the two builds are byte-identical
and "0" when they are the same size but differ, and two whole classes of
board could never reach "*".
The name reaches binaries_are_identical() lower-cased, because that is
the key the column lookup needs, but the files are AP_Periph.bin and
AP_Bootloader.bin, so on a case-sensitive filesystem neither candidate
was found and the answer was "differs" whatever the bytes said. CI
proves those two are identical: base and pull request builds log the same
APP_DESCRIPTOR crc32 pair, which covers the whole image.
A Linux board writes neither .bin nor .elf -- disco's bin/ holds bare
ELFs -- so nothing was compared there either. Match a file without
regard to case, and fall back to the extensionless ELF.
While here: enumerate the directory being measured rather than always the
master one, and import tabulate where it is used, so the module can be
imported by a test without it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@MAV_LOG has no class of its own to find in the symbol table, so it is
detected by its prefix string, which only the backend table row puts in the
binary. That row is also only built where logs go to a filesystem, so the
option depends on Logging.
The auto-trim scheduler task moved from RC_Channels_Copter::auto_trim_run
to Copter::AHRSTrimming::auto_run, so extract_features.py was reporting
AP_COPTER_AHRS_AUTO_TRIM_ENABLED as absent from binaries which have it.
The table says which commit it was built from and which it was compared
against, and --json-output writes the same as data for the workflow that
comments it on a pull request.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
waf does not persist `-j` in the configuration, it's only used for the
command it's specified on. So specifying `-j` to this script never did
anything to limit the number of build processes because the job limit
was only given to configure commands.
Now the script passes the appropriate number of jobs to build as well
as configure commands, so the limit is actually applied.
It's unclear if passing the number of jobs to the configure command
accomplishes a lot, but it doesn't hurt so it's kept.
test Renode / cubeorangeplus-quadplane (push) Canceled after 0s
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
Rather than maintaining copies of the bus and device type tables,
decode_devid.py now parses the enums in AP_HAL/Device.h, AP_SerialManager.h
and the compass, IMU, baro and airspeed backend headers using
logger_metadata/enum_parse.py. A small rename map keeps established
display names (DRONECAN, AK0991x), and the retired LIS2MDL ID, which is
in no enum, is listed explicitly. Comments on enum entries are shown as
warnings when decoding.
--dump-json and --dump-json5 write the tables, with a format_version
and a content-hash data_version, for tools without a source tree;
--json reads such a file back. A copy of the script outside an
ArduPilot tree (as synced by MethodicConfigurator) reads devid.json from
its own directory. The files are published alongside LogMessages.* by
build_log_message_documentation.sh, and CI dumps them in the
logger_metadata step so that header changes which break parsing are
caught.
The tables had drifted from the headers: ACC_LSM9DS1,
INS_ZEROONE_FPGA_SCH16T and INS_ICM56686 were missing, MMC5883 is now
MMC5983, AK8963/BMM150 had trailing spaces, and several names now
follow the headers.
Generates parameter XML and LogMessages documentation.
Stores compressed metadata in __METADATA__ directories.
Adds atomic directory replacement and locking.
Adds --metadata-only and vehicle-selection options.
Copies metadata into stable-release directories.
Adds metadata URLs to generated manifests.
Improves tag validation and skips unsupported Blimp stable/beta builds.
use as a diagnostic tool was limited when it would exit on some failures but not on others.
Make it exit on failures by default, add a flag to allow a user to get consistent behaviour the other way
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The rover workflow's build job primes ccache with
--enable-math-check-indexes, matching sitltest-rover and
sitltest-sailboat, which both pass "Rover" as the run_autotest name.
sitltest-balancebot passes "BalanceBot", so it configured without the
flag, missed the cache on 872 of 1382 compiles and spent 6m33s
building ardurover against 14s in the other two jobs.
Key the flag on the build step rather than the name, so BalanceBot
builds the same binary as the other build.Rover jobs.
DataFlash field names are case-sensitive, so the lowercase lookup always fell back to bus zero. Read the CANF and CAFD Bus field using its declared capitalization.
AP_COMPASS_LEARN_COPY_FROM_EKF_ENABLED, defaulting to
COMPASS_LEARN_ENABLED && AP_AHRS_ENABLED, so the disarm-time copying of
EKF-learned offsets can be compiled out on its own.
save_ekf_learned_offsets() moves out of the COMPASS_LEARN_ENABLED block
in Compass_learn.cpp so the two are genuinely separable; the in-flight
learner drags in the EKF-GSF yaw estimator, which this does not need.
Verified with nm: Compass::save_ekf_learned_offsets is present in a
default build and absent when the define is 0, with COMPASS_LEARN_ENABLED
still enabled.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Add process_scan_build_output.py, which parses the .plist reports a
scan-build run leaves behind and fails if any finding is not accounted
for, so that findings cannot creep back in over time.
Findings are matched against scan_build_suppressions.py. Each entry
names a file and one issue hash per clang major version: the hash clang
derives for a finding is not stable across releases, and not every
finding exists in every release. An entry is stale, and so a failure,
only when it carries a hash for the version actually run and that hash
matched nothing. The list is therefore an accurate record of the
findings we have reviewed and accepted, and fixing a suppressed finding
fails until its entry is removed.
The check fails closed. It refuses to pass unless the report directory
exists, holds at least one report, and names a clang version the
suppression list has hashes for; a run under an unrecorded version
would otherwise quietly check nothing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
generate_manifest.py unpacks brand_map values as (brand_name,
manufacturer). Four entries were added with the fields the other way
around, so the manifest published the vendor as the board name and the
board name as the vendor.
Only the tuple order changes; the strings are left as they were.
test.BattCAN has been broken since it was added in June 2024 and
nothing noticed, because no CI job ran it. Run it alongside test.CAN
in the existing sitltest-can target: no new CI job, roughly two
minutes added under peripheral lockstep.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 5a6d13039ae87bda202bd3aaa379a35128ad1b9b)
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>