Covers no yaw source, a compass that stops delivering data and GPS yaw
lost. The simulated gyro has no bias, so any Z bias the EKF learns is
phantom. The yaw reference is removed at arming and the flow scale error
doubled, so the bias grows within 40 s of flight rather than 240 s: yaw
fused during the climb otherwise holds it down.
Flow has to have been fused for a zero bias to mean anything. XKF5 flow
innovations do not show that, as they are written before the innovation
gate and never cleared, so the test requires that flow fusion started
and that aiding never stopped while armed, which with flow as the only
aiding source means an update passed the gate at least every 5 s.
Debug build, max Z gyro bias in deg/s against a 0.1 limit. Merge-base:
no yaw source 0.26 to 0.27 (4 runs), compass lost 0.95 to 1.10 (4
runs), GPS yaw lost 1.09 to 1.26 (3 runs). With the fix: 0.00, 0.01 and
0.01 to 0.02 (3 runs). The test takes about 23 s.
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.
Add MountAVTCM62DualImageStartCapture covering a single image on all
cameras and on each camera, a fixed count via COMMAND_LONG, capture
until stopped via IMAGE_STOP_CAPTURE, and rejection of a zero interval
with multiple images, a negative camera ID and an absent camera slot.
Extend MountAVTCM62DualMission with an all-cameras mission item and
check MountAVTCM62 rejects an unconfigured slot.
Unconfigured and absent camera slots are DENIED by the camera selector
resolution rather than FAILED as in the original tests.
Based on Peter Barker's work in ArduPilot/ardupilot#33900.
Co-authored-by: Peter Barker <pbarker@barker.dropbear.id.au>
The analyser no longer reports the GCS.h num_intervals finding, so
retaining its suppression fails CI. Keep the separate suppression for
the remaining read in GCS_Common.cpp.
FBWB and CRUISE circuit legs require a minimum distance, not arrival
inside a narrow band. Accept distances beyond the threshold so
high-speedup position samples cannot skip the success window.
Exercise MT11 and AVT camera and gimbal behaviour, telemetry-driven
targeting, RTSP bounds, target refresh, capture-status expiry and
backpressure-safe stream replies.
Verify unicast routing and opt-in telemetry, extended parameter replies
from isolated links, forced home and origin events, and MT11 directory
listing and XML downloads through a unicast connection.
Check native camera identity across isolated and broadcast links,
default, configured and colliding component IDs, mixed native and servo
cameras, and native versus configured mount associations.
Cover camera and gimbal selectors for live commands and missions,
including legacy NaN values under floating-point traps, video stream
selection, native gimbal IDs, cached attitude frames and FC-owned
camera ACK identity. Fix the MAVFTP import ordering required by Ruff.
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 coverage flags were added in configure_env, so every probe program
built by cfg.check() was compiled with -fprofile-arcs and linked with
-lgcov. On boards which also link with -Wl,--wrap,malloc (SITL, Linux,
QURT) libgcov's malloc call is rewritten to __wrap_malloc, which the
probe does not define, so the probe fails to link and the feature under
test is silently recorded as absent. Under --coverage every header
check ("endian.h", "byteswap.h", the cmath checks, memrchr) reported
"not found"; HAVE_BYTESWAP_H was never defined and the fallback in
AP_Common/missing/byteswap.h was compiled instead. That fallback
collides with glibc's own __bswap_16/32/64 as soon as a translation
unit also includes netinet/in.h, which broke build.unit_tests in the
weekly coverage workflow.
Move the flags into Board.configure_coverage() and call it from the
top-level configure once the checks are done, so the probes are never
instrumented and the coverage configuration produces the same
ap_config.h as a normal one.
Co-authored-by: Pierre Kancir <pierre.kancir.emn@gmail.com>
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>
restart_SITL_frame() called build_SITL_frame() with none of the options
the suite was built with, so the frame binaries were configured without
--debug, --num-aux-imus and the rest. The binary under test then no
longer matched the suite's configuration, and CI - whose ccache holds
--debug objects - rebuilt both firmwares from scratch inside the test:
DroneCANCompass sitl 8m19s + sitl_periph_universal 3m51s of 743s
CircuitStatusScript sitl 5m51s + sitl_periph_universal 2m43s of 520s
It also left build/sitl configured without --debug for later tests.
Pass the suite's build options through, as the Replay tool build
already does. PPPPeriph no longer needs to ask for --debug itself.
The underlying problem is not really new, it was just never noticed by
the analyzer. Previously, `find_grid_cache` would dereference a null
pointer by working with `cache[0]` if it was called when `cache` is
`nullptr`. Now it will just dereference a null pointer directly.
Unfortunately, this is impossible to fix as the function must return a
cache block. Fortunately, nobody calls it in this circumstance.
Unseeded, MAVProxy draws the lost packets from fresh entropy on every run,
so a failure could not be reproduced. A fixed seed loses the same packets
each time; it still leaves gaps to fill.
The listing tests only ever listed a directory they had just made, so the
paths they used were all of one shape. The bug where listing the root
dropped every file lived through all of them because no test named the
root, which is the first thing a file browser asks for.
Cover the shapes a client actually sends: a directory with nothing in it,
and "." for the directory the vehicle was started in.
The long-name test also only listed without times, where the boundary of
what fits a packet sits eleven bytes further out. Run it both ways, with
names either side of the boundary a listing with times has, so that
dropping an entry which no longer fits still cannot end the listing.
These three were skipped pending MAVProxy fixes: continuing a directory
listing from the listing's own state rather than by mutating the last
operation sent, and taking a listing entry's size from the end of the
entry. MAVProxy master now does both, so rather than skipping them
outright they ask MAVProxy whether it can do this and return early if it
cannot.
The test set 50% receive loss and then waited only for "Total size",
which a listing that gave up part-way through would still print. Wait for
the total the files actually add up to instead.
Give every file a different size while doing so: with all of them the same
the total is just a count, so a listing which lost one page and repeated
another still reached it.
MAVFTPListDirectoryWithTimeMAVProxy checks times are asked for by
default and rendered in local time, and that "ftp set list_time 0"
turns them off again. MAVFTPListDirectoryUnknownTimeMAVProxy checks a
file whose time the autopilot does not know shows as "-" rather than as
a date; its directory holds one file, because a listing is printed in
readdir order and an expect for one entry cannot sit behind another.
MAVFTPListDirectoryFallbackMAVProxy makes the timestamped replies
disappear with the module's own pkt_loss_rx and requires the plain
listing to complete once the loss is lifted - the fallback is the whole
point of the new opcode and nothing else exercises it.
MAVFTPListDirectoryLossyRetry drops half the replies and requires the
listing to finish, as it has no retransmit of its own.
MAVFTPListDirectoryWithTimeMAVProxyTabInName is the timestamped
counterpart of the existing tab test, which takes the size and the time
from the end of the entry rather than the size from the front.
That existing test now asks for a plain listing explicitly: against a
MAVProxy which knows the opcode it would otherwise get a time it is not
expecting.
All are skipped, as they need a MAVProxy which is not released yet.
The spec says a virtual directory is named with an @ prefix, that the
recipient maps it to the underlying filesystem, and that a path which is
not there is NAKed FileNotFound. Check each of those: the alias lists what
the log directory holds, a path below it resolves both with and without
the trailing slash the spec's own example carries, an unknown path below
it is NAKed FileNotFound, and a file read through the alias gives back
what was written.
@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.
A name containing a tab must come back from ListDirectoryWithTime as a bare
skip entry, with the names around it still listed, while a plain listing
still sends it as it is.
A listing with times gives a directory the same three fields as a file,
so the listing helper now picks directory entries apart the same way and
the test checks the subdirectory's size and time. The subdirectory gets a
modification time of its own so that an entry carrying some other entry's
time would be caught.
Lists a directory of files with known sizes and modification times both
with and without times, paging through the listing by entry count as a
GCS does, and checks the entry format, that directories are still bare
D entries, and that a time the autopilot does not know comes back as
the zero the format defines rather than as the FAT epoch.
The listing helpers learn to ask for times; the directory they build
gets modification times to ask about.
The previous thresholds only checked the sign and a 2-degree minimum.
On the ground the pilot's total lean is limited to 10 degrees, split
across both axes by the test's diagonal stick, so the saved trim is
fully determined; check it against that value.
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>
SDCardWPTest installed mission_spiral.lua with the non-context
install_example_script() and removed it with a bare
remove_installed_script() thirty lines later, with no try/finally
between them. Every wait_text() and set_parameter() in that stretch can
raise, and any of them leaves the script installed: the removal is
simply skipped.
That matters more here than for a leaked trick file, because
mission_spiral.lua ends in .lua - lua_scripts.cpp loads every .lua in
scripts/ - so the leftover is picked up and run by the next test to
start a vehicle with scripting enabled.
The test already pushes a context, and the harness pops any the test
leaves behind when it fails, so install_example_script_context() cleans
up on both paths. Every other install site in Tools/autotest already
uses the _context form.
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.
previously adding or removing support for an OS meant changing lines unrelated to that OS.
Add a bit of cruft to the file so that adds/removes are just clean line additions or removal
This reverts commit 157d471fe4.
PR #34359 was merged by mistake. On the bench, with an ESC on
YJUAV_A6SE_H743 output 1, the hold presents a continuous high (full
throttle to a PWM ESC) for about 10.5s after every reset, and for as
long as safety is engaged when output 1 is a motor outside
BRD_SAFETY_MASK, which is Copter's default. The ESC started to enter
throttle calibration. Back the change out until the hold can be
chosen per output.
Built with Tools/scripts/build_bootloaders.py from the hwdef change that
holds the PWM1/JTDI pin high through the bootloader, so a servo on M1 no
longer receives a 500 to 700us pulse on every reset and power-on.
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.
--check-parameter-leaks, --no-check-parameter-leaks and
--unix-domain-socket with its --uds alias are accepted by autotest.py but
were not offered.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
waf runs from the root of the checkout, but the completion ran ./waf in
whatever directory it was typed in, so BUILD.md's suggested
alias waf="<ardupilot>/modules/waf/waf-light" proposed nothing at all
from a subdirectory. Ask git for the root, run waf there, and key the
cache on it rather than on the current directory.
Recognise the help by its "Main commands" heading rather than by being
non-empty: a clone whose waf submodule is still missing prints a notice
and exits 0, which passed the old check and cached the handful of
hardcoded words for that directory.
Read the cache variables with ${var-} so a shell with set -u does not
abort on the first tab press.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
--net-device, --sim-periph-lockstep and --use_sim_time are accepted by
the binaries but were not offered.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
autotest.py --help needs pymavlink installed; without it the checker
stopped on a traceback and never reached the checks after it, which is
how the SITL binary ones stayed unnoticed. A tool that cannot run is a
fact about the machine, not about the completion scripts, so warn and
skip it, as the missing SITL binary already did.
A long option may contain an underscore -- the SITL binaries have
--use_sim_time -- and stopping at it reported a missing --use that no
completion script could ever satisfy.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
bash/_waf declares no options of its own any more -- it scrapes ./waf
--help when it completes -- so there is nothing left to fall out of sync.
What the checker still found there was its own case patterns: it read
--enable-*|--disable-*|--embed-* as three options waf does not accept and
reported them as stale.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The options are scraped from ./waf --help instead of being written out
here, the ~900 generated --enable-/--disable-/--embed- options are held
back until the word being completed asks for one, and the result is
cached for the shell session because ./waf --help costs ~0.2s and this
runs on every tab press.
The caches are per checkout and are not filled unless the help was read:
a tab press outside a checkout would otherwise cache the handful of
hardcoded words and disable completion for the rest of the session, and
a second checkout would inherit the first one's options and boards.
list_boards is cached the same way and its errors are discarded, so
--board no longer costs a waf run per tab press or complains outside a
checkout.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Enable -Werror by default for the QURT C and C++ compiler flags now that the outstanding absolute-value warnings have been addressed. Keep the existing --disable-Werror option available for development builds.