74072 Commits
Author SHA1 Message Date
Brown 7cc52a61a3 AP_BoardConfig: rename board type for Holybro Pixhawk6X Rev8
Rename the ICM45686-specific board type to Rev8 while preserving enum value 43, and use a board-independent name for the compatible IMU slot probe.
2026-09-15 16:59:33 +10:00
Brown 0252d304ed AP_HAL_ChibiOS: support LSM6DSV on Pixhawk6X 45686 layout
Add LSM6DSV SPI aliases and fallback probes while preserving the
existing slot rotations.
2026-09-15 16:59:33 +10:00
Brown 1a203c3391 AP_BoardConfig: support LSM6DSV on Pixhawk6X 45686 layout
Allow each of the three IMU slots to detect either ICM45686 or a
supported LSM6DSV-family device.
2026-09-15 16:59:33 +10:00
Brown 7e631ecc71 AP_HAL_ChibiOS: KakuteH7Mini add LSM6DSV IMU support
Add SPI device and IMU probe line for the LSM6DSV on KakuteH7Mini.
2026-09-15 16:56:31 +10:00
Brown ed74303314 AP_HAL_ChibiOS: KakuteH7 add LSM6DSV IMU support
Add SPI device and IMU probe line for the LSM6DSV on KakuteH7.
2026-09-15 16:56:31 +10:00
Dr.-Ing. Amilcar do Carmo Lucas 2dc256b862 Tools: Generate __METADATA__ directories with parameter and LogMessages documentation
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.
2026-09-15 16:36:38 +10:00
Stephen Dade 50ecb2ed39 Tools: Add autotest for rover AUTO mode speed and accel changes 2026-09-15 15:05:12 +10:00
Stephen Dade 386098326c AR_WPNav: Apply WP_SPEED changes instantly 2026-09-15 15:05:12 +10:00
Stephen Dade fd5858245b AR_WPNav: Update speed, accel and jerk limits more regularly 2026-09-15 15:05:12 +10:00
Eric Katzfey 50bc1fa059 AC_PrecLand: suppress QURT absolute-value warning
Use the QURT-only Clang diagnostic push/pop approach from PR #28897 around the landing retry altitude comparison. Keep the existing subtraction and fabsf conversion unchanged while suppressing -Wabsolute-value at this call site.
2026-09-15 11:30:47 +10:00
Peter Barker de411b3818 AP_ADSB: bound Sagetech GPS message field widths
The GPS message is a run of fixed-width ASCII fields, each exactly as
wide as the value it holds, with the terminating nul landing on the
first byte of the field which follows it.  Nothing bounded the
formatted values, so an out-of-range input would overflow its field and
shift everything after it, and gcc-16 rejects the latitude outright:

  AP_ADSB_Sagetech.cpp:497: error: 'snprintf' output may be truncated
  before the last format character [-Werror=format-truncation=]

Bound each component to the widest value its field can represent, and
share the formatting between the two Sagetech drivers rather than
duplicating it.

The seconds of the time of fix are now formatted as an integer rather
than as a float so that the width of the field is known; the
milliseconds are rounded and carried into the seconds, which gives
output identical to the previous "%06.3f" except on exact
half-millisecond ties.  The MXS driver converted its epoch to seconds
through a double, which can round up to the following second at
present-day epoch values; it now uses integer division.

Built for sparknavi-blue, which master does not currently build.
2026-09-15 11:13:23 +10:00
g945643frankie b89c42c9f9 AP_InertialSensor: ICM56686 RTC_CONFIG comment ASCII tidy 2026-09-15 11:11:00 +10:00
g945643frankie 0eb9a753e7 AP_InertialSensor: scope RTC_CONFIG RMW to ICM56686
Keep the historical blind 0x20 RTC_CONFIG write on ICM-45686 CLKIN boards;
only RMW bit5 on ICM-56686 so shipping Cube/SIYI/JPilot CLKIN paths stay unchanged.
2026-09-15 11:11:00 +10:00
g945643frankie 5164ca8450 AP_InertialSensor: ICM56686 comment/naming tidy-up
Address tridge review NOTES: fix +4-map / SREG_CTRL / fifo_addr_space_lock
comments, rename FIFO_CONFIG2 reset value prefix, use reg456() for pad regs,
document CLKIN ACCEL_LP_CLK_SEL difference, RMW RTC_CONFIG bit5.
2026-09-15 11:11:00 +10:00
g945643frankie 6152ed1254 AP_InertialSensor: ICM56686 gyro settle wait 70ms
Align with TDK GYR_STARTUP_TIME_US (70000). DS-000563 typ is 35 ms;
70 ms is the vendor-driver conservative value after PWR_MGMT0 before FIFO_IF_EN.
2026-09-15 11:11:00 +10:00
g945643frankie a0802443c3 AP_InertialSensor: ICM56686 FIFO_CONFIG4 uses bit0 per DS-000563
Revert FIFO_TMST_FSYNC_EN to 0x01. ICM-56686 FIFO_CONFIG4 bit0 is TMST/FSYNC
and bit1 is compression (DS-000563 v1.1); the 45686 bit map does not apply.
2026-09-15 11:11:00 +10:00
g945643frankie 1e6288eaf1 AP_InertialSensor: fix ICM56686 FIFO_CONFIG4 and FIFO arm order
Set FIFO_TMST_FSYNC_EN to bit1 (0x02). Power/settle and fifo_reset before FIFO_IF_EN so warmup samples are not retained.
Addresses review notes from tridge on PR #34368.
2026-09-15 11:11:00 +10:00
g945643frankie e87935e3bd Tools: add ICM-56686 to decode_devid.py
DEVTYPE_INS_ICM56686 is 0x44.
2026-09-15 11:11:00 +10:00
g945643frankie d23b2df7c1 AP_InertialSensor: fix ICM-56686 IREG offsets and FIFO_CONFIG2
Follow-up to #33991. The ICM-56686 shares the ICM-456xy user-bank
layout (+4) but not the IREG SRC map. DS-000563 v1.1 places
GYRO_SRC_CTRL at IPREG_SYS1+0x9A (bits 3:2) and ACCEL_SRC_CTRL at
IPREG_SYS2+0x6D (bits 1:0); the 456xy 0xA6/0x7B writes left AAF at
reset.

FIFO_CONFIG2 reserved bits must keep reset 0x20 or checked-register
monitoring marks the IMU unhealthy. PWR_MGMT_AUX1 0x3 enables AUX1
on this part. SREG_CTRL only needs the endian bit cleared so 20-bit
FIFO_HIRES packets remain valid. Soft reset restores SPI pad
overrides. Do not poke 456xy-only IREG (STC, AUX_OVRD) on 56686.
2026-09-15 11:11:00 +10:00
Iampete1 64634be4fb AP_Periph: init rangefinder without serial port 2026-09-15 10:44:29 +10:00
Peter BarkerandClaude Opus 5 e8d00f3993 autotest: add AHRSExternalNoAttitudeAirspeedIndex test
The External AHRS backend must report the airspeed sensor index even
when it has no attitude.  Plane cannot observe this, as it falls back
to DCM when External has no attitude; Copter does not fall back.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 10:41:40 +10:00
Peter BarkerandClaude Fable 5.1 49b71e1f29 autotest: add AHRSActiveAirspeedIndex test
Each AHRS backend now fills in the index of the airspeed sensor it is
using.  A backend which fails to do so reports index zero, which is
indistinguishable from the first sensor at the default ARSPD_PRIMARY,
so the existing affinity tests do not catch it.

Make the second sensor primary and check AIRSPEED.flags under DCM,
EKF2, EKF3, SIM and External in turn, waiting for each backend's
"active" announcement so a fallback to DCM cannot pass on its behalf.

Deleting the assignment from the DCM or External backend makes the
test fail at that backend's stage.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-15 10:41:40 +10:00
Peter Barker bdab7791df AP_AHRS: move active airspeed sensor result into Estimates structure 2026-09-15 10:41:40 +10:00
Peter Barker d7c87a46b6 AP_AHRS: collapse airspeed_sensor_enabled back into sole caller 2026-09-15 10:41:40 +10:00
Peter Barker e25ed5159f AP_AHRS: correct defines around using airspeed sensor
we don't need to constrain via the GPS data, so stop requiring it to return the airspeed sensor data
2026-09-15 10:41:40 +10:00
Peter BarkerandClaude Opus 5 fbf750c2ca Tools: honour MAVPROXY_CMD everywhere we run MAVProxy
MAVPROXY_CMD exists so you can point the tooling at a MAVProxy other
than the first "mavproxy.py" on PATH - a virtualenv, or a checkout you
are debugging against.  pysim/util.py reads it, but three other places
which launch MAVProxy spell the name out and so quietly run the wrong
one:

 - sim_vehicle.py, which is the most surprising of the three, since it
   already imports pysim.util for everything else it needs.  Under
   cygwin the default stays mavproxy.exe; an explicit MAVPROXY_CMD now
   wins there too.
 - Tools/renode/test_all.py, which also names it in the error it prints
   when it cannot be found, so that now names what was actually looked
   for.
 - the ros2 MAVProxy launch action.

Behaviour is unchanged when MAVPROXY_CMD is unset: mavproxy_cmd()
defaults to the same "mavproxy.py" these were hard-coding.

Checked sim_vehicle.py's assembled command and Tools/renode/test_all.py's
lookup both ways - unset gives "mavproxy.py" as before, set gives the
named path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 09:47:09 +10:00
Peter BarkerandClaude Opus 5 cd8a2df5fa autotest: skip MAVFTPCrcCompareMAVProxy only where crccmp is missing
The test drives "ftp crclocal" and "ftp crccmp".  MAVProxy grew those in
328d7de20 (2026-07-27) and has not cut a release since - the newest tag,
v1.8.74, is from 2025-08-02 and contains neither - so on a released
MAVProxy "ftp crclocal" falls through to the usage print and the test
waits out its 60s pexpect timeout.

Skipping it unconditionally would cost real coverage: build_ci.sh
installs MAVProxy by cloning master, which does have both commands, so
the test runs and passes in CI today.  A version gate would not work
either, because MAVProxy master still calls itself 1.8.74 - the same
version the release reports - so any mavproxy_version_gt() test would
disable the test in CI as well.

Ask the ftp module whether it implements the command instead, and skip
only where it does not.  Nothing has to be un-done later: the skip stops
applying by itself once the local MAVProxy has crccmp.  Keeping this in
disabled_tests() rather than returning early inside the test means the
skip is still reported in the run summary and the JUnit report.

Ask the MAVProxy we are actually going to run, not the one this process
could import.  MAVPROXY_CMD can name a MAVProxy in another virtualenv,
which is the whole point of the variable, and an in-process "import
MAVProxy" would then answer for the wrong install - saying the command
is present when the MAVProxy under test lacks it, which is exactly the
60s timeout this is meant to avoid.  Take the interpreter out of the
mavproxy script's shebang and put the question to that, keeping the
lookup next to mavproxy_cmd() in util.py where MAVPROXY_CMD is read.

Verified four ways: with crccmp present the entry is absent and
test.Plane.MAVFTPCrcCompareMAVProxy passes; with MAVPROXY_CMD pointing
at a stub install whose ftp module has no crccmp the probe reports False
and the entry appears, while an in-process import in that same run still
says True; and with MAVPROXY_CMD naming a path that does not exist the
probe returns "don't know" and the test is left enabled.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 09:47:09 +10:00
zhoujinhuaandClaude Opus 5 9189701872 bootloaders: add CoreWingF405WingV2 and CoreWingF405WMiniV2
Prebuilt bootloader binaries built with
Tools/scripts/build_bootloaders.py using GNU Arm Embedded Toolchain
10-2020-q4-major.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 09:23:34 +10:00
zhoujinhuaandClaude Opus 5 d95d3c1f5f hwdef: add CoreWingF405WMiniV2
The CoreWing F405 Wing Mini V2 is a compact variant of the
CoreWingF405WingV2. The hwdef inherits from the base target and only
overrides the Mini-specific hardware differences.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 09:23:34 +10:00
247974be1a hwdef: add CoreWingF405WingV2
The CoreWing F405 Wing V2 is a fixed-wing and QuadPlane/VTOL flight
controller with an STM32F405 MCU, ICM-42688P or BMI270 IMU, SPA06-003
baro, AT7456E OSD, integrated PDB and a USB extender connector for an
optional BLE/WiFi telemetry module.

Co-authored-by: Henry Wurzburg <hwurzburg@yahoo.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 09:23:34 +10:00
Pierre Kancir e3d4be8608 AP_Math: improve div1000 testing 2026-09-15 07:18:13 +10:00
Pierre Kancir 4cbc74d8fa Tools: add better tests for test_div1000 2026-09-15 07:18:13 +10:00
Peter Barker 35356c656c autotest: test DO_REPOSITION is refused if GUIDED cannot be entered
Fails without the preceding fix: the command is ACCEPTED and the vehicle,
still in AUTO, turns away from its mission leg towards the reposition
target.
2026-09-14 19:59:12 +10:00
Peter Barker 0d3e2aaa8e Plane: fail DO_REPOSITION if GUIDED cannot be entered
When DO_REPOSITION asked for a change into GUIDED and the mode change
was refused (for example GUIDED being blocked by FLTMODE_GCSBLOCK) the
result of set_mode() was ignored.  The requested location was still
loaded with set_guided_WP() and the command was ACCEPTED, so a vehicle
in AUTO stayed in AUTO but flew towards the reposition target.

Return MAV_RESULT_FAILED instead, leaving the current mode's navigation
alone.
2026-09-14 19:59:12 +10:00
Peter BarkerandClaude Opus 5 f47861a374 .github: test_coverage: keep going when a coverage test suite fails
run_coverage.py now exits on the first failing test suite by default;
keep running the remaining suites so we still get a coverage report.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-14 18:58:28 +10:00
Peter BarkerandClaude Opus 5 3f73e5ad1f Tools: make run_coverage.py stop at errors, add a flag to keep going on errors
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>
2026-09-14 18:58:28 +10:00
Peter Barker 7dbc76fb1c Tools: enable math index checks for every build.Rover CI job
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.
2026-09-14 18:58:17 +10:00
Peter Barker 50ed390939 autotest: IE24: set failsafes so vehicle disarms on low/crit battery
this test was relaying on the vehicle disarming even with an action of NONE.  Since we're changing that behaviour, change the test to set the failsafe to a value which will disarm the vehicle
2026-09-14 12:44:42 +10:00
Peter Barker 22bd42f6c8 autotest: add test for battery instant-disarm on failsafe when fs-action-NONE 2026-09-14 12:44:42 +10:00
Peter Barker 2aeb8bf242 Copter: do not disarm the vehicle on battery fs if fs is none 2026-09-14 12:44:42 +10:00
Clyde McQueen acef45eb0f autotest: improve Sub.GuidedPosVelAccel test 2026-09-12 19:46:43 -03:00
Clyde McQueen 51cd2dd1c0 AP_Scripting: avoid divide by zero in Lua script 2026-09-12 19:46:43 -03:00
Clyde McQueen 29b250b476 ArduSub: reject force inputs 2026-09-12 19:46:43 -03:00
Peter Barker 37ea692edb autotest: check an entry which exactly fills a listing packet is sent
Lists a directory holding a file whose entry is exactly the 239 bytes a
listing payload carries, one a byte longer than that, and a short one.
The first has to be listed, the second cannot be and must not be, and the
third proves dropping the one which cannot be sent did not end the
listing.
2026-09-12 15:00:50 +10:00
Peter Barker 4cedc1e346 GCS_MAVLink: list an entry which exactly fills a listing packet
An entry needing exactly as many bytes as the payload holds was treated as
unsendable and dropped. It does fit: AP_HAL::Util::vsnprintf builds its
BufferPrinter with size-1 and then writes the terminator itself at
str[size-1], and the byte that overwrites is the entry's own trailing NUL,
so the encoding which lands in the buffer is the one intended.

Compare against the size rather than allowing it, in all three places, so
the two packing loops still agree on what can never be sent.
2026-09-12 15:00:50 +10:00
Peter Barker b4697f8189 autotest: check the root directory lists its files
Puts a file and a directory in the root, lists it both with and without
times, and checks both come back - and, with times, that they carry the
modification time they were given.
2026-09-12 15:00:50 +10:00
Peter Barker 2a18e59e96 GCS_MAVLink: do not double the separator when listing the root
The path of the directory being listed is put in front of each entry's
name in order to stat it, with a "/" between. The root's path is already
just "/", so that produced "//name".

Most filesystems collapse that - FatFs skips duplicated separators
(ff.c:3019) and so does littlefs (lfs.c:1503) - but SITL's map_filename()
strips exactly one leading "/", so "//name" escapes to the host root. The
stat then fails, and a failed stat drops the entry, so every file in the
root went missing and the listing came back with directories only.

ArduPilot's own backend_by_path() also strips exactly one leading slash,
so a doubled separator would likewise miss a virtual backend.
2026-09-12 15:00:50 +10:00
Peter Barker f30be0bdea autotest: check a short FTP reply carries nothing past its size
Lists a directory to leave entries in the reply buffer, then asks past the
end of that listing, and checks the one byte NAK which comes back has
nothing but zeros behind the error code.
2026-09-12 15:00:50 +10:00
Peter Barker 94726509fc GCS_MAVLink: do not send FTP reply bytes which mean nothing
The whole reply buffer went out whatever the reply's size, so a short
reply was padded with bytes which are not part of it.

Those bytes come from the same reply, not an earlier one: setup_reply()
clears the whole transaction, but list_dir()'s offset-skip loop then
formats each entry it skips into response.data as scratch, and a listing
which ends in an EndOfFile NAK sets only data[0] - leaving the last
skipped entry sitting behind the error code.

Copy only the bytes the reply says it has. The rest of the packet is
already zero, and since MAVLink 2 trims trailing zeros from a payload, a
short reply now goes out shorter as well.

The scratch reuse behind it is left as it is; not sending the bytes is
what keeps them off the air.
2026-09-12 15:00:50 +10:00
Yves 14c871f273 AP_VideoTX: accept variable-length SmartAudio 2.1 settings
pre-commit / ci (push) Canceled after 0s
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
SmartAudio 2.1 reports a variable number of supported power levels. Validate the fixed fields, advertised level count, and CRC instead of requiring the maximum-size response struct.
2026-09-11 10:56:05 +01:00