The logs were downloaded with process_ftp_reply() called in slices of 4.2 s, to send heartbeats between them and to detect a stall. pymavlink terminates the session when process_ftp_reply() times out, so any download longer than one slice was aborted at its first byte count, and reported as stalled at 0 bytes after 30 s: a 290 KB log over a serial link at 115200 baud, or a long log over a telemetry radio. The download is now driven in one call bounded by the budget, the idle detection of pymavlink detects a stall, and the heartbeats are sent from the progress callback.
Assisted-by: Claude:opus-5.5
* ci(clang-tidy): analyse each source file once
* fix(clang-tidy): print a failure command that still reproduces
The failure line printed -p with the temporary deduplicated database, which is deleted when the script exits, so pasting the command failed to load a compilation database. Print the build's own database instead.
Assisted-by: Claude:claude-opus-5-5
* fix(clang-tidy): remove the temporary directories on every exit
The deduplicated database directory and the -fix export directory were only removed on the normal path, so an exception such as an invalid -exclude regex or a missing clang-apply-replacements left them in $TMPDIR. Ctrl-C keeps its explicit removal because it ends with SIGKILL, which skips atexit.
Assisted-by: Claude:claude-opus-5-5
---------
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
The AI review on #29008 ran to about 900 words for two process gaps and three nits, and its "changes suggested" verdict came from the process gaps alone, so a maintainer could not tell whether the code needed anything. The PR now gets a verdict decided by code findings only and one sentence per posted finding. The evidence, the model's summary, the checklist and nits stay in the job summary, which the review links to.
Assisted-by: Claude:claude-opus-5-5
* ci(clang-tidy): stop false positives in the inline review comments
Of the 828 inline comments the clang-tidy job posted on 98 PRs since May, only 328 were unique: COMMENT reviews can't be dismissed, so every push posted every finding again. Most of the rest were artifacts of how the diff step runs:
- It parses against the test build dir, which is only configured, so the uORB, events and parameter headers don't exist and every TU stops at a missing include. clang-tidy then reports on the half-parsed AST: events::send<T>(...) as a chained comparison, sizeof on uORB arrays as sizeof of a pointer.
- It parses every changed .h on its own as C++, including board configs, NuttX headers and headers shared with C. The gating run never lints .h.
- .clang-tidy disabled macro-parentheses, incorrect-roundings and misplaced-widening-cast under their old misc- names, which clang-tidy 18 no longer knows, so all three were on.
Generate the test dir's headers, skip .h and board/NuttX files, drop clang-diagnostic-error (the build jobs report real compile errors), skip findings already posted on the PR, and disable four checks that only produced noise: googletest underscore names, virtual-class-destructor on gtest fixtures and singletons, suspicious-call-argument, and not-null-terminated-result on binary packet buffers.
Assisted-by: Claude:claude-opus-5-5
* ci(clang-tidy): keep the gating checks and skip the fuzztest header
.clang-tidy also configures the gating run, which enabled incorrect-roundings, macro-parentheses and virtual-class-destructor on purpose, with code fixes. Drop the stale misc- names instead of renaming them, and turn virtual-class-destructor, suspicious-call-argument and not-null-terminated-result off for the inline comments only.
Header generation also built fuzztest's json_grammar.h, which pulls in abseil and the antlr4 runtime: 336 ninja edges and 39 s in CI instead of 22 edges and 4 s.
Match already-posted comments on the line too, so a second finding with the same message elsewhere in a file is still posted. Drop only headers under boards/ and platforms/nuttx/, so SITL's own board sources are still linted.
Assisted-by: Claude:claude-opus-5-5
* feat(bl_update): pet the watchdog during erase and program
CAN nodes start the IWDG in the bootloader, and nothing else pets it
while bl_update holds the scheduler lock.
Assisted-by: Claude:claude-opus-5-5
* feat(nuttx): emit canbootloader to board extras and build bootloader+app image
canbootloader builds now write extras/<vendor>_<board>_bootloader.bin
like FMU bootloader builds do, which plugs CAN nodes into the existing
ROMFS / rc.board_bootloader_upgrade / jlink wiring. CAN node app builds
with that file also emit <config>_with_bootloader.bin (bootloader padded
to the app's ELF load address, followed by the CRC'd image) so a bare
board is flashed in one SWD step instead of two.
Assisted-by: Claude:claude-opus-5-5
* feat(cannode): run rc.board_bootloader_upgrade at startup
The hook was only wired into the FMU rcS, so SYS_BL_UPDATE did nothing
on CAN nodes even with bl_update built in.
* feat(ark): enable bootloader update on CAN nodes
Ships the CAN bootloader in the app ROMFS so a node can rewrite it via
SYS_BL_UPDATE without SWD.
Assisted-by: Claude:claude-opus-5-5
* docs(dronecan): bootloader update and combined image for CAN nodes
Assisted-by: Claude:claude-opus-5-5
* build(ark): rebuild CAN node bootloaders from current main
The committed binaries predated the F412 chip-selection and linker fixes
and the NuttX 12.12 upgrade, so they no longer matched the source.
Assisted-by: Claude:claude-opus-5-5
* feat(uavcannode): update the bootloader as soon as SYS_BL_UPDATE is set
Same approach as AP_Periph. Running the update on the next boot needed
two reboots and reported nothing over CAN: it ran before uavcannode
started, and the boot script printed "done" even when bl_update failed.
The node now flashes while running, skips an identical bootloader, and
the result reaches the flight controller through the existing log
message forwarding. A value left set from before boot is cleared rather
than acted on.
The flash routine moves into a library so uavcannode can call it.
Assisted-by: Claude:claude-opus-5-5
* docs(dronecan): note that the combined CAN node image resets parameters
Found on the bench: the padding between bootloader and app covers the
parameter sectors, so every SWD flash of the combined image erases them.
Assisted-by: Claude:claude-opus-5-5
* fix(nuttx): limit CAN bootloader extras and combined image to STM32
Every canbootloader build wrote its binary to the board's extras, so a
later nxp_ucans32k146 default or cyphal configure picked it up and failed
in prepend_bootloader.py: the S32K application loads at 0x6000, below
the 0x08000000 base the script and bl_update assume. CI only passed
because the canbootloader was built after both had configured.
Assisted-by: Claude:claude-fable-5-1
* fix(bl_update): pad the image before erasing and warn on every flash failure
The STM32F4 up_progmem_write() returns -EINVAL for an odd byte count,
which was only found out after sector 0 had been erased. An erase or
program failure also leaves the board without a bootloader, but only a
verify failure told the user to retry before rebooting.
Assisted-by: Claude:claude-fable-5-1
* fix(romfs): pack rc.board_bootloader_upgrade only where rcS runs it
CAN nodes with bl_update carried the script in their ROMFS although the
cannode rcS never sources it: uavcannode flashes the bootloader itself.
Assisted-by: Claude:claude-fable-5-1
* refactor(bl_update): move the flash routine to src/lib
The library lived under systemcmds, which is configured after drivers,
so uavcannode could only link it through a forward reference. The
watchdog is now selected by chip because the platform targets do not
exist yet when src/lib is configured.
Assisted-by: Claude:claude-fable-5-1
* docs(dronecan): the CAN bootloader is written to extras on STM32 only
Assisted-by: Claude:claude-fable-5-1
Comment-triggered runs belong to main, so GitHub never lists them in the
PR's checks and the only sign of a running review is a reaction on the
comment. Set an informational "AI PR Review" commit status on the PR
head, linking to the run: pending when the gate accepts, then success or
error. A run cancelled by a newer review of the same commit leaves the
newer run's status alone.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
The review footer now ends with the run's cost, model, number of model
calls and wall time, for example "Cost: $7.42 · Claude Opus 5.5 · 12
model call(s) · 22 min"; a refusal notice shows what was spent before
the refusal. The cost is Claude Code's own estimate at list prices,
which matched a recomputation from token counts on Bedrock. Making the
price visible on every review also discourages casual re-runs.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Tools/ci/ai_review reviews a PR with Claude Code on Amazon Bedrock and
writes a pr-review artifact for pr-review-poster.py.
- Pipeline: gather (metadata, linked issues, commits, CI status, per-file
patches, earlier comments), a reviewer pass returning line findings,
PR-level findings and a contribution checklist, an independent
validator pass per finding, and code-owned routing: inline only at high
confidence, otherwise a before-merge list or a collapsed section. No PR
is skipped for size; generated files are listed but not diffed.
- Trust: the PR is untrusted data. The agent runs --bare --restricted
with read-only tools. Code it writes to check its math runs only in a
px4-dev container (no network, no credentials, read-only checkout,
gVisor in CI), and `harden` blocks the runner's metadata service first.
Output containing a credential is never written.
- A model refusal produces no review and passes the provider's exact
reason, category and request ID through.
- Models and per-role defaults live in models.json; models-check verifies
access before switching.
- Process checks (tests, description, upgrade notes, docs) live in a
CI-only prompt so the interactive skill stays lean.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Two optional manifest fields for producers that need them:
- post_without_comments posts the summary as a COMMENT review even when
there are no inline comments.
- supersede_previous replaces the body of the producer's earlier COMMENT
review with a superseded note, keeping the old text collapsed, since
GitHub cannot dismiss COMMENT reviews.
Both default to false, which is the behaviour clang-tidy relies on. Adds
the poster's first unit tests, including ones that pin the defaults.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
* feat(tools): add mavlink_serial_bridge.py reference bridge application
Implements the SERIAL_CONTROL bridge application described in the Bridge Application section of docs/en/uart/serial_passthrough.md: it connects to the vehicle over MAVLink, exposes a virtual serial port (PTY), and translates traffic bidirectionally for any passthrough-capable port (TEL/GPS/ESC bitbang). Existing ESC configuration/flashing tools and GPS/RTK utilities can point at the exposed PTY without native MAVLink support.
Also updates serial_passthrough.md to reference this implementation instead of only describing the pattern in the abstract.
Signed-off-by: Phil-Engljaehringer <philipp.engljahringer@auterion.com>
* fix: add send_serial_control function
* docs: document mavlink_serial_bridge.py usage and limits
Explain what the bridge supports and how to run it safely: the example
connection string only listened on loopback, and --setup reboots the
flight controller with motor outputs disabled without saying so.
Restore the DShot ESC Serial Passthrough section, which was commented
out until a bridge existed, and update the v1.18 and main release notes
so v1.18 users know the bridge on main works with their firmware.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* fix: removed duplicated port-map
* fix: send_serial_control adjust padding
* fix: set target_system and target_component only once
* fix: implemented changes requested by alex
* fix: implemented changes requested by hamish
* fix: avoid indefinite loop waiting for heartbeat
* fix: no chunking in send function needed
* fix: add lock and avoid trailing 0x00 sent on shutdown
* docs: explained SWITCH <device_id> feature in docs
---------
Signed-off-by: Phil-Engljaehringer <philipp.engljahringer@auterion.com>
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
actions/labeler adds every scope whose globs match any changed file, so a PR touching a test, a param file and a board config collects a pile of scope labels (2.6 per PR on average over the last 300, up to 20) and nobody reads them. A scope label is only useful when it names the core of the PR.
The title's conventional-commit scope already states that core, so the scope label now comes from it, resolved to an area of the tree; the diff decides only when the title names nothing. Each file belongs to one scope, and labels this workflow added earlier are removed when they stop matching. scope:testing, scope:uorb, scope:middleware and scope:logging are no longer applied.
Assisted-by: Claude:claude-opus-5-5
* fix(gz_bridge): use the corrected Gazebo magnetometer frame and units
The Gazebo magnetometer system defaults to a legacy mode: it computes the
field in NED, places it into the ENU world frame without converting, and
reports gauss. The bridge swapped body axes to compensate, but no body-axis
swap undoes a mirrored world-frame field at every attitude. At the default
world location this left the heading about 6 deg off on the ground.
gz-sim 8.6 added use_units_gauss and use_earth_frame_ned (gz-sim#2460).
Turn both off in server.config, so the field is in tesla and physically
correct in the sensor's FLU frame, and convert it like the IMU: FLU -> FRD,
tesla -> gauss.
Other ways of starting gz (standalone mode, gz-sim < 8.6, worlds with their
own systems) still deliver the legacy output. Detect it from the field
magnitude, keep the previous mapping for it and warn once.
Needs the x500 (and other) model magnetometer noise in tesla, see
PX4-gazebo-models.
* docs(gz_bridge): describe the legacy magnetometer frame accurately
NED components on ENU axes is a 180 degree rotation about the horizontal
axis between north and east, not a mirror.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* build(simulation): bump gz models for magnetometer noise in tesla
The gz_bridge server.config now runs the Magnetometer system in tesla, so
the models need their noise in tesla too, otherwise it is 1 gauss and PX4
refuses to arm. Also pulls in the advanced_plane parachute plugin and the
default world elevation fix.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
---------
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Co-authored-by: matteo <197973584+megavedl@users.noreply.github.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* docs(contributing): discourage force-pushing during review
A force-push after review has begun erases the commits a reviewer has read, so they cannot see what changed since. The guidance told contributors to squash and reword instead, which contradicts the commit and pr agent skills. PRs are typically squash-merged, so branch history does not need cleaning up before merge.
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* ci(workflows): remove commit message check
PRs are squash-merged under the PR title, which is still checked. Flagging the individual commits pushed contributors to rewrite history mid-review.
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
---------
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Queue unwritten stdin instead of dropping it when a request is larger
than the pipe can take at once, and drain the queue without blocking
the CAN work queue. Only stdin needs to stay nonblocking (it's written
from that work queue); stdout reads stay blocking, gated on FIONREAD,
like the mavlink shell already does.
Report a shell session that has exited as an explicit error instead of
silently swallowing EPIPE and returning empty output. Surface that
error in the Python client as well.
Flush the queued stdin on idle polls too, not just when new input
arrives, since an idle poll is all the client sends while the user
isn't typing. Only redirect fd 0/1 for the child once both stdio
backups succeeded, so a dup() failure can't leave the node's own
stdin/stdout pointing into the shell pipes. Distinguish EAGAIN (retry
later) from EPIPE (never will succeed) when flushing queued stdin, so
a dead shell doesn't hold the queue forever refusing new input.
Only compile the shell sources when CONFIG_UAVCANNODE_COMMAND_SHELL is
enabled, matching how every other optional uavcannode feature is
gated, instead of pulling nshlib into every board's image. Detect a
dead shell task with nxsched_get_tcb(), the same lookup top/cpuload.cpp
use, instead of a POSIX-only helper with no NuttX implementation. Fix
GetNodeInfo name decoding in the client to tolerate non-UTF-8 bytes
instead of crashing the scan.
Signed-off-by: danielbuleandra <daniel.buleandra@auterion.com>
The workflow triggers on pull requests that touch a board defconfig or
the USB ID tooling, and checks only the defconfigs the PR adds or
modifies. The file list comes from diffing the checked-out PR merge
commit against its base parent, so no API call or token is needed. A PR that changes the tooling itself is checked against every
board, so a checker change is proven on the real tree and not only by
its unit tests. A test keeps the tooling list and the workflow paths
filter in sync.
A manual run checks every board. There is no push or scheduled run: the
registry repo checks its own changes against PX4 main, and board
changes reach main only through PRs.
The mypy and flake8 step for the checker and runner lives in
python_checks.yml with the other Python tooling checks.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Boards that ship the Dronecode USB vendor ID 0x3643 must use a product
ID allocated in the Dronecode/usb-ids registry, and nothing in the tree
enforces that. A board reusing another board's PID, or picking an
unallocated one, becomes ambiguous to host tools that identify boards
by VID/PID.
The contract is the registry mapping: a defconfig under
boards/<vendor>/<board>/ using VID 0x3643 must use a registered PID
whose px4_board is exactly <vendor>/<board>. The USB vendor string is
deliberately not checked, since the registry does not govern it. Boards
on other vendor IDs are ignored.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Every px4_add_git_submodule call ran check_submodules.sh twice, at
configure and build time, and with CI=true force-updated each submodule
every time, a 2017 workaround for an interactive prompt that is gone.
VS Code and CLion force-updated too, resetting submodule changes under
development.
The check now runs once per configure. A missing submodule is fetched;
one at another commit is kept as it is, with a warning locally and an
error in CI.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Some boards heartbeat from more than one component on the same sysid. An
FMUv6X-RT on v1.17 sends HEARTBEAT from compid 1 (PX4) and from compid 236
with autopilot=MAV_AUTOPILOT_INVALID. connect() accepted the first
heartbeat from anyone and left target_component at pymavlink's default of
0, so param and mission requests went out as broadcast, the other
component could answer, and param_stress mixed its PARAM_VALUE stream
(index, count, values) into the autopilot's download.
connect() now waits for a heartbeat whose autopilot is not
MAV_AUTOPILOT_INVALID and pins target_system/target_component to its
source. pymavlink only latches target_system once and never sets the
component, so the pin holds for the life of the connection. The
wait_heartbeat() helper shares that filter and, once pinned, only counts
the pinned component; wait_reconnect() goes through connect() and gets
the same behavior after a reboot.
PARAM_VALUE replies in px4bench.params, param_stress and link_forwarding
are filtered to the pinned component, and flight_mission uses the pinned
component for MAVFTP and the armed/disarmed heartbeat checks instead of a
hardcoded 1.
Diagnosed by @farhangnaderi in #27852.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
The 1.17 run in #27840 read 'SDLOG_UTC_OFFSET not found in downloaded
set' as the parameter not existing on that release. It does exist there;
the download itself was the anomaly (19 params total, where a booted
board reports hundreds, since the autopilot lists used params only).
Name the downloaded count and that semantics in the failure so the next
tiny param set is diagnosed as a degraded session, not a missing param.
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
log_transfer crashed with a raw ImportError on setups whose pymavlink
predates the mavftp module (#27840). mavftp first shipped in pymavlink
2.4.42, so raise the floor in pyproject.toml, Tools/setup/requirements.txt
and the README, and guard the import in px4bench.ftp so an old install
reports a clear upgrade hint instead of a traceback. Both mavftp
consumers now import it through the guard.
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Running the suite from main against a release/1.17 FMUv6X-RT board
(#27840) failed boot_health and flight_mission at 'shell open' while
reboot_loop passed the same check 10/10 in the same run. The failing
opens were the sessions immediately following a closed one, so the
single wake write was being consumed before the firmware nsh pipes were
reading and no amount of waiting could recover it. Re-send the wake
write every second until the deadline, strip stale BENCHOPEN wake lines
from subsequent command output, and replace the 5s hardcoded at every
call site with one px4bench.SHELL_OPEN_TIMEOUT (10s) so the budget is
tunable in one place.
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Each build job compiled its group one target at a time, and the serial
parts of every build (configure, the NuttX make, linking) left the 4-vCPU
runners about half idle. Two concurrent builds keep them around 80% busy
and cut total build-step time about 24% and runner cost about 17%.
Larger runners and more slots were measured and cost more than they save.
build_all_runner.py replaces build_all_runner.sh. NuttX compiles inside
its source tree, so each extra slot is a git worktree under .build_slots/.
All submodules are fetched once before building, each slot clones them
locally from the checkout, and builds run with GIT_SUBMODULES_ARE_EVIL=1
so CMake's per-configure submodule check does not sync and update them
concurrently on the shared .git/config. Targets that write the same
build/ directory (<board>_deb with <board>_default, the metadata targets
with px4_sitl_default) always share a slot, and the runner refuses a plan
that would split them. Every target is built even after a failure. Build
output streams with a [seconds|slot target] prefix, each target prints its
memory usage or, on failure, the excerpt from the first error, and a Build
Logs step prints each target's full log as one collapsed group. Slot build
directories are moved into build/, so packaging is unchanged.
The matrix now carries targets as a list plus a slot count from
build_all_config.yml; the comma-joined string existed only because
workflow expressions could not pass an array to a shell command, which
join() now does. The scan job runs new tests for the generated matrix and
the slot assignment.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Homebrew rebuilds and drops the gz bottles whenever homebrew-core bumps
protobuf or abseil, which breaks the macOS Gazebo install until the pins
catch up. conda-forge keeps every package it has published, so
Tools/setup/macos/pixi.toml and its lock install the same gz, protobuf,
abseil, OpenCV and GStreamer binaries until the lock is updated on
purpose. OpenCV is the headless build, and GStreamer brings the good,
bad and ugly plugin sets the gz camera plugin's pipeline uses.
macos.sh installs the environment with pixi and loads it from the venv
activation through a small script, since pixi shell-hook would export
the installing shell's PATH. The build and the gz launch do not depend
on that activation: CMake searches the environment like it pins the
.venv Python, and px4-rc.gzsim sources gz_env.sh before it looks for
gz, which loads the environment when it is not already active and puts
its lib dir ahead of Homebrew's in the dyld fallback path.
conda-forge's gz-transport13 does not pull in cppzmq, so the manifest
lists it.
The osrf/simulation pin, the protobuf pin and the weekly bot that
refreshed them are removed. The homebrew-core commit moves into
homebrew-pins.txt unchanged.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
PX4 SIH with the Hawkeye visualizer replaces jMAVSim, in SITL and as the
display-only viewer for SIH running on hardware. Drop the jMAVSim
submodule, its make targets, px4-rc.jmavsim, the 10017_jmavsim_iris
airframe and the VS Code debug helpers, stop installing Java and ant in
the macOS and Arch setup scripts, and point the remaining mentions at SIH
and Hawkeye.
BREAKING CHANGE: make px4_sitl jmavsim and SYS_AUTOSTART 10017 no longer
exist. Use make px4_sitl_sih sihsim_quadx with Hawkeye instead.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
* feat(ci): report flash and RAM use against capacity, analyze fmu-v2
The size comment showed only the delta, which does not say how close a target is to its limit. Capacity comes from the board's own linker script, because the flash-analysis build links against an oversized flash region so that a change which overflows still gets a report.
fmu-v2 adds an F4 next to the F7 and H7 targets, and with 1 MB of flash it is the FMU that overflows first.
Assisted-by: Claude:claude-opus-5-5
* fix(ci): shorten the size comment's usage columns
Five columns with capacities spelled out made the table too wide to read at a glance.
Assisted-by: Claude:claude-opus-5-5
The commit hash compiled into px4_firmware_version_binary() changes its code size, so a PR with no code change reported -8 B on v6x and got a comment. Changes that only touch agent instructions also no longer build the targets.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(ci): report flash and static RAM usage separately
Bloaty's VM total includes zero-initialized RAM and understates the combined cost of data and code copied from flash into RAM. Report the flash load image and static RAM allocations independently so the PR headline reflects each resource's actual change.
Assisted-by: Codex
* docs(ci): trim memory analysis comment
Assisted-by: Codex
* fix(ci): diff PR flash usage against the merge commit's base
The base branch tip is fetched when the job runs, so a PR merged while its job was queued was compared against itself and reported a near-zero change, and commits landed in the meantime showed up as reverted.
* fix(ci): measure flash image from section headers
ld maps the ELF header into the first LOAD segment when its max page size exceeds the flash origin's alignment (binutils 2.34 defaults to 64 KiB), so segment-based accounting rejected valid firmware as outside the flash region.
* feat(ci): flag notable flash and RAM changes
Growth over 100 B and 1000 B gets yellow and red markers, savings over 100 B green, so reviewers can spot size regressions without reading the numbers.
* refactor(ci): derive flash and RAM totals without per-target constants
The matrix duplicated each board's flash-analysis linker region, which would drift silently. Section headers alone distinguish code executing in place (VMA == LMA) from data copied to or reserved in RAM, and the image span matches objcopy -O binary.
* fix(ci): limit the bloaty breakdown to VM sizes
Debug, symbol and string table rows only change the file size and made up most of the comment.
* fix(ci): post flash analysis only when size changes
A push that puts flash and static RAM back to zero was still rewriting the sticky comment, so a PR with no size change carried a zero report. Remove that comment instead. Fork tokens cannot delete it, so those PRs hand a delete artifact to the poster.
Assisted-by: Grok:grok-4.7
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(ci): retain zero-delta flash analysis comments
Existing reports can be updated when size deltas return to zero, avoiding a separate privileged deletion path.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Assisted-by: Codex:gpt-6
---------
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
The schema path still says component_information/, so --skip-if-no-schema makes the check a no-op. QGC only accepts parameter metadata version 1, while the schema floor rose for optional fields. Override that floor and keep emitting version 1.
Assisted-by: Grok:4.7
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
The job ran brew update and then installed whatever Homebrew was publishing, except Gazebo, which stayed on one commit. Those were built against different protobufs, so a release upstream failed the build with no commit here. Check the package repos out at commits recorded in the tree and do not update them. Run on macos-15 only, so the OS label cannot move either.
Assisted-by: Grok:grok-4.7
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
The build runs brew update and then pours Gazebo from one pinned tap commit while the rest of the install, including protobuf, comes from current Homebrew. A release in either repo fails the check with no commit here, and the GitHub-hosted image moves on its own, so the job cannot be a closed set. Drop the build and the weekly pin refresh. The setup script, the pins, and the refresh script stay for local use.
Assisted-by: Grok:grok-4.7
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Every gz .pb.h refuses to compile against anything but the exact protobuf
its gencode came from, so the bottles gz-tap-pin.txt holds osrf/simulation
at only build against the protobuf homebrew-core shipped the day OSRF built
them. homebrew-core moves protobuf on its own schedule and OSRF rebuilds
days later, so `make px4_sitl` has been failing on macOS on every branch
since homebrew-core shipped protobuf 36.2.
Pin protobuf as well, to the homebrew-core revision that installs the
version the pinned gz bottles carry, and derive that pin from the bottles
themselves so the two can never disagree. A protobuf release then becomes a
no-op here instead of days of red CI while OSRF catches up.
The pinned install has to run after the other simulation packages and with
the dependents check off: opencv@4 depends on protobuf too, brew resolves a
dependency against the versions recorded in the dependent's bottle, and it
reinstalls dependents whose linkage it has just broken. Pinning the formula
with `brew pin` is not an option either, brew then refuses to install
anything that depends on it.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julian Oes <julian@oes.ch>
* fix(macos.sh): trust brew taps before tapping them
Recent Homebrew validates every formula of a tap while tapping it. On
Homebrew 6.0+ loading a formula from an untrusted tap is refused, so
`brew tap osx-cross/arm` and `brew tap PX4/px4` now fail with
"Cannot tap ...: invalid syntax in tap!" because `brew trust` only ran
afterwards. Without the PX4/px4 tap, `brew install` aborts on `fastdds`
before pouring any package, ccache included, and the macOS CI job dies
with `ccache: command not found`. main has been red since 2026-09-14.
Run `brew trust` before `brew tap`; it accepts taps that are not
installed yet.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix(macos.sh): trust osrf/simulation tap before tapping it
Same ordering problem as the toolchain taps: with Homebrew 6.0+ tapping
an untrusted tap fails, so there is no tap clone to apply the
gz-tap-pin.txt pin to. The later install of
osrf/simulation/gz-harmonic then taps it implicitly at HEAD, silently
skipping the pin and risking Gazebo building from source.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julian Oes <julian@oes.ch>
* fix(macos.sh): set -e to abort on first failure
The script kept going after a failed `brew tap` or `brew install`, so
the macOS CI job only failed much later with `ccache: command not
found`, far away from the actual cause.
Add `set -e`. Commands that are allowed to fail (`brew uninstall flock`
on a machine without it, `brew doctor` warnings, fetching the gz tap pin
whose failure is already handled by the following checkout) get an
explicit `|| true`.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Signed-off-by: Julian Oes <julian@oes.ch>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Julian Oes <julian@oes.ch>
* feat(ros2): add Humble development images and distro releases
Build Humble on Jammy without replacing its ROS DDS libraries: Agent 2.4.3
links private, pinned Fast DDS/CDR dependencies. Publish Humble and Jazzy
tags independently while leaving packaged runtime images Jazzy-only.
Assisted-by: Copilot:gpt-6-astra
* refactor(ros2): share pinned Agent DDS libraries across distros
Build the Agent against the same private Fast DDS and Fast CDR pins on Humble and Jazzy, without replacing either ROS underlay. Remove distro-specific build branches and name the dependency manifest for its shared role.
Assisted-by: Copilot:gpt-6-astra
The NWBlue Pro H757 is a 30x30 mm FPV flight controller built around the
CubePilot CubeNode H757 module: STM32H757, on-module ICM45686 IMU and
on-carrier DPS368 baro on SPI3, IIS2MDC magnetometer on I2C3, microSD on
SDMMC2, 9 DShot/PWM outputs, CAN1 and six UARTs.
Pin assignments follow the ArduPilot NWBLUE_PROH757 hwdef, including board
ID 5730. The sensor rotations do not: the hwdef specifies ROTATION_ROLL_180
for the IMU, but on this hardware both the IMU and the magnetometer are
unrotated, confirmed on the bench and by compass calibration.
PLL1P runs at 480MHz so the timer clock is 240MHz, which DShot600 divides
into exactly 20 ticks per bit. At 400MHz that division truncates and every
bit comes out 4.2% short, which some ESCs reject. Bidirectional DShot works
on every output except FMU_CH6: that one is TIM4_CH4, and the H7 DMAMUX has
no request line for it.
Timers: TIM1/2/3/4 drive the outputs, TIM8_CH3 the buzzer so a passive
piezo produces a real tone, TIM12 the HRT and TIM6 the uavcan clock. TIM5
is deliberately left unallocated - the HRT does not work there (every
periodic work item runs once and is never rescheduled, while
interrupt-driven peripherals keep going so the board still looks alive),
and it is also the H7 default for the uavcan clock, where it kept DroneCAN
from coming up.
There is no analog OSD chip, so an HD VTX has to render the OSD itself over
MSP DisplayPort on the VTX connector (USART6 / TEL2). MSP_OSD_CONFIG is
left unset so that port can equally serve as a plain TEL2.
px4_uploader learns the board's USB ID (CubePilot VID 0x2DAE, PID 0x2001).
bringup.md records what has been verified on hardware and what has not.
Assisted-by: Claude:claude-opus-5[1m]
Signed-off-by: Julian Oes <julian@oes.ch>
Make the standalone ROS toolchain available from the same registries as the ROS runtime images. Preserve opt-in publication, existing GHCR tags and both architecture SBOM indexes.
Assisted-by: Copilot
Provide a supported Jazzy environment for SIH/Gazebo development and source builds, with pinned tooling and reproducible multi-architecture image publishing. Separate package and container assets from ROS source preparation, and keep checkout workspaces fresh through a Python CLI.
Assisted-by: Copilot:gpt-6-astra
* feat(mavlink): serve packed parameters as @PARAM/param.pck
QGC already downloads ArduPilot parameters as a packed FTP file, which
is much more reliable on lossy SiK links than the PARAM_VALUE firehose.
Serve the same format from PX4 so a hash miss can use that path.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(mavlink): serialize the full message when resending a cached FTP reply
_last_reply caches only the header, PayloadHeader and four data bytes,
but the resend path handed that 19-byte array to the serializer as a
complete mavlink_file_transfer_protocol_t, which reads 254 bytes and
transmits whatever follows the cache. The decoded request is dead once
the resend decision is made, so expand the cache into it instead of
adding another message to the receiver thread's stack. Clear the unused
payload before caching so a resent NAK matches the original.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* test(mavsdk_tests): download parameters via MAVLink FTP
Fetch @PARAM/param.pck through MAVSDK's burst download on SIH and check
every entry against the PARAM_VALUE stream, so the packed format and the
FTP server's session, size and EOF handling stay covered by the SITL
tests that QGC and MAVSDK both rely on.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(mavlink): cache FTP Open ACKs whose size LSB is 5
_reply skipped the compact cache whenever data[0] was kErrNoSessionsAvailable. On a NAK that is the error code; on an Open ACK it is the file size LSB. A lost Open ACK for param.pck of that length was retried as a second Open and failed.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* feat(tools): download packed parameters over MAVFTP
Host-side check of @PARAM/param.pck against the PARAM_VALUE stream.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(mavlink): pad so a defaulted value does not straddle an FTP block
pack() kept the last 4 bytes of an entry in one chunk. With withdefaults those bytes are the default, so the value can still split. QGC always requests defaults; a hole-fill then retries one chunk with a live param_get().
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(mavlink): snapshot param.pck at open so a param_set cannot corrupt it
Pack the used set once into a heap buffer. Reads memcpy that snapshot, so a value change during the download cannot shift later entries or splice two generations across a retried FTP block.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(mavlink): freeze param.pck membership instead of snapshotting the file
Keep which parameters appear and whether each includes a default in bitsets (~1 KB). Pack values live. Layout cannot shift mid-download; a retried block cannot splice a number.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* style(mavlink): format MavlinkFtpParamTest.cpp
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* refactor(mavlink): keep FTP work buffers as members
@PARAM/param.pck is a connect-time path, not the rare path the lazy new[] was for. send() could free the buffers after 2 s of no request while a burst was still running. Fold them into the instance (495 B) and always idle-close the session at 30 s.
A new Open takes over the single session so a lost Terminate on a slow link does not NAK until that close.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(tools): make mavftp_param.py reliable on a radio link
pymavlink applied FTP timings after ResetSessions, wrote param.pck?withdefaults=1 into cwd, and bumped the session id on Open retry (PX4 only ACKs session 0). Set radio timings at construction, pin session 0, retry a missed Open, and treat a complete decode as success.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* feat(mavlink): accept packed parameter FTP uploads
CreateFile/Write/Terminate of @PARAM/param.pck applies the ArduPilot
packed stream so a GCS can bulk-load without a PARAM_SET round trip per
value. Unknown and read-only names are skipped; Terminate NAKs a
truncated file or the with-defaults magic.
* test(mavsdk_tests): upload MPC_XY_P via packed param FTP
Pin the SIH upload case to a known float instead of whatever
get_all_params() returns first.
---------
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
On NuttX these are two things: / is the filesystem root, and /fs/microsd is the
SD card mounted under it. MAVLink FTP serves the root and confines writes to the
SD card, so the read-only ROMFS at /etc is visible but cannot be written.
On POSIX they were the same directory. PX4_ROOTFSDIR and PX4_STORAGEDIR both
resolved to CONFIG_BOARD_ROOT_PATH, which on SITL is ".", so the working
directory was simultaneously the FTP root and the only writable area. The
consequences were that the ROMFS symlink sat inside the FTP root, and that
_validatePathIsWritable() had nothing meaningful to check against and so was
compiled out on POSIX entirely, leaving no write restriction at all.
Give POSIX the same split. CONFIG_BOARD_ROOT_PATH keeps its meaning as the
storage directory, and a new CONFIG_BOARD_FS_ROOT_PATH names the root FTP
serves, defaulting to the storage path so every existing board is unchanged.
SITL sets the root to "." and storage to "./fs", which mirrors NuttX: logs,
parameters, dataman and eeprom move under ./fs, and etc/ stays in the root as
read-only data.
With storage distinct from the root, the write restriction now applies on every
platform rather than NuttX only, and no longer compares against a hardcoded
prefix length that was wrong for any board not using /fs/microsd.
Assisted-by: Claude:claude-opus-5[1m]
Signed-off-by: Julian Oes <julian@oes.ch>
The bash version spent most of its lines on plumbing: parsing a report
back out of a per-commit `brew ruby` child, awk and herestrings for set
logic, bash 3.2 workarounds, and a trap to restore the tap. The job
itself is small and lives inside Homebrew anyway, so run the whole thing
under Homebrew's Ruby and call its tap, formula and bottle APIs directly.
One process instead of one Homebrew startup per candidate commit, the
tap checkout restored by ensure, tarballs checked with Net::HTTP, and no
second language embedded in a string. Formulary.clear_cache and
Tap#clear_cache between checkouts keep each candidate's formulae fresh.
GITHUB_OUTPUT still arrives because brew forwards GITHUB_* whenever CI
is set. Same walk, same exemption for formulae unbottled at the pin,
same outputs; verified to pick the same commit as the bash version.
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
homebrew-core moved to protobuf 36.0 and abseil 20260817.0, and the
macos-15 runner image (20260828) now ships that snapshot. The gz bottles
at the pinned commit c90f81ac were built against protobuf 35.1, so the
gz_bridge build fails on every run since today with
gz/msgs/details/discovery.pb.h:17:2: fatal error: "Protobuf C++
gencode is built with an incompatible version of"
on main as well as on this PR. 43aee9cc is tap HEAD, where OSRF has
rebuilt every gz-harmonic dependency for protobuf 36.0 and abseil
20260817.0 (the gz-msgs10 10.4.0_2 bottle's INSTALL_RECEIPT records
both). Tools/ci/refresh_gz_tap_pin.sh picked this commit.
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
The weekly refresh workflow carried its logic inline, compared only the
tap SHA against the pin, and duplicated the --sim-tools package list.
`brew install --dry-run` never prints "from source", so its bottle check
could not fire.
Tools/ci/refresh_gz_tap_pin.sh now owns the job and the workflow calls
it. It reads the osrf/simulation formulae from macos.sh, walks the tap
from HEAD back to the pin, asks Homebrew at each commit whether every
formula in the runtime closure has a bottle for the host, HEAD-requests
each tarball, and rewrites the pin to the first commit that passes.
Formulae with no bottle at the current pin (the gz-harmonic
meta-formula, which OSRF never bottles) are not required.
peter-evans/create-pull-request opens or updates the bot PR from the
script's outputs, so an unmerged bump is refreshed instead of duplicated.
The job runs on macos-15, the oldest macOS in compile_macos.yml, because
Homebrew pours an older macOS bottle onto a newer one, not the reverse.
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
macos.sh only pinned osrf/simulation when --ci was passed, so dev
machines still hit OSRF's bottle-gap window and built Gazebo from
source. Apply it whenever --sim-tools runs.
The pin is a point-in-time SHA with nothing to advance it, so add a
weekly workflow that checks whether osrf/simulation HEAD is fully
bottled and opens a PR bumping gz-tap-pin.txt when it is.
Assisted-by: Claude:claude-sonnet-5
Signed-off-by: FARHANG <farhang.nba@gmail.com>
* fix(uploader): shorten the wait for a bootloader after reboot
Reboot-to-bootloader is immediate, so this wait only has to cover USB
re-enumeration, not the reboot. Five seconds of it meant a port that was
never going to answer held up every other port on the list, and it could
outlast the window it was trying to catch: a board sits in its bootloader
for BOOTLOADER_DELAY, 3s on some boards and 5s on most, before it jumps to
the application.
With an FMU-v6C and a Black Magic probe attached, a pass over the probe's
two CDC nodes drops from 14.75s to 5.45s, and a running application is in
its bootloader 3.52s after the uploader starts.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julian Oes <julian@oes.ch>
* fix(uploader): report ports by their /dev/serial/by-id name
A ttyACM number is handed out in plug order and says nothing about which
device it belongs to, which is awkward as soon as there is more than one
CDC device on the bus -- "Attempting reboot on /dev/ttyACM0" gives no hint
that it is a debug probe rather than the board.
Resolve each detected port back to its by-id symlink when one exists, so
every message names the device. This also collapses a duplicate: a board
is matched both by a by-id pattern and by the /dev/ttyACM* catch-all, so
it was being probed twice per pass. With an FMU-v6C and a Black Magic
probe attached, detection goes from four entries with two naming the same
board to three, each identifying itself.
Linux only; elsewhere, and for ports with no symlink, paths are unchanged.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julian Oes <julian@oes.ch>
---------
Signed-off-by: Julian Oes <julian@oes.ch>
* fix(ci): attach FMU bootloader .bin to GitHub releases
Releases only shipped `_bootloader.px4`, the USB uploader envelope. SWD recovery needs the raw `.bin` at 0x08000000.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(ci): do not attach unused bootloader .px4
USB flashing would write it into the application slot. SWD uses the raw .bin.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(ci): omit bootloader SBOMs from GitHub releases
GitHub Releases glob artifacts/**/*.sbom.spdx.json. Bootloader metadata dirs are not a recovery artifact.
*_bootloader_* variants (e.g. bootloader_secureboot) stay omitted: those images are baked with in-tree test keys.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* docs(bootloader): point SWD recovery at the release .bin
Match the cannode pre-built blurb. The .px4 envelope is not the SWD image.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* docs(bootloader): scope release .bin to SWD programmers
gdb load needs ELF program headers. The release image is a raw .bin for ST-Link / CubeProgrammer / OpenOCD, and only in-tree *_bootloader targets are attached.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
---------
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(ci): publish flashable CAN node firmware
Release packaging only collected .px4 files, which the DroneCAN bootloader cannot flash.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(ci): attach canbootloader .bin as the SWD image
The cannode bootloader is a raw .bin for st-flash, not a .px4 envelope.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(ci): drop cannode.zip from release assets
The target-named .uavcan.bin and _canbootloader.bin files are the flashable images; the zip only duplicated them.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
---------
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>