49471 Commits

Author SHA1 Message Date
Jacob Dahl
047fddbcd8
fix(sensors): fix baro publish rate limiter aliasing (#26967)
Use timestamp_sample instead of time_now_us for the rate limiter check
to sync to the sensor clock rather than the wall clock.

Switch from direct timestamp assignment to epoch-advance
(_last_publication_timestamp += interval_us) with a catch-up guard to
prevent aliasing artifacts when the sensor sample rate is close to the
configured publication rate.
2026-04-04 00:02:21 -08:00
PX4BuildBot
dd2530bb09 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-04 03:27:16 +00:00
Mirko Denecke
897ff241ce docs(sensor/airspeed): add UAV-DEV GmbH DroneCAN Airspeed and Barometer Sensor 2026-04-03 21:20:34 -06:00
Hamish Willee
6f18fa39e8 fix: template_module update to best practise 2026-04-03 21:14:55 -06:00
Pavel Guzenfeld
348a558a15 fix(navigator): correct mission resume waypoint with camera triggering
getPreviousPositionItems() already decrements the start index
internally before searching. The call in on_activation() at line 227
passed _inactivation_index - 1, causing a double-decrement that made
the vehicle resume at waypoint n-2 instead of n-1.

All other call sites (rtl_mission_fast_reverse.cpp:81,
rtl_mission_fast_reverse.cpp:133, mission_base.cpp:1149) pass the
index directly without pre-decrementing.

The bug has been present since commit 007ed11bbe (June 2023).

Closes #26795

Signed-off-by: Pavel Guzenfeld <pavelgu@gmail.com>
2026-04-03 21:10:11 -06:00
PX4BuildBot
b412796fc7 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-04 03:03:41 +00:00
Silvan
6597c4680c feat(battery): enable use of BAT_n_I_OVERWRITE for all battery estimation sources
Signed-off-by: Silvan <silvan@auterion.com>
2026-04-03 20:57:05 -06:00
PX4BuildBot
df8747eb10 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-03 21:15:36 +00:00
Jacob Dahl
04134dccab
fix(uavcan): use node-published timestamps for CAN sensor bridges (#26945)
The FC-side DroneCAN sensor bridges (accel, gyro, rangefinder) used
hrt_absolute_time() in the receive callback as timestamp_sample,
adding ~3-16ms of systematic CAN transport delay.

For messages with a uavcan.Timestamp field, the cannode can publish
the actual sample time via UAVCAN GlobalTimeSync. The RawIMU publisher
already did this for IMU data; apply the same pattern to the range
sensor publisher, and update all three FC bridges to prefer the
message timestamp with a fallback to hrt_absolute_time() for nodes
that don't set it.
2026-04-03 13:08:24 -08:00
PX4BuildBot
4d0efccb55 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-03 18:38:09 +00:00
Baardrw
115f205cbc
docs(gz_bridge): magnetometer device address documentation (#26940)
* fix: added comment explaining why dev id address can only be 3 or 4

* fix: change link to point to main px4 repo

* fix: typo

* formatted

* chore: formatting
2026-04-03 10:31:29 -08:00
Ramon Roche
039ec78d35 fix(ci): copy events metadata to top-level artifact directory
The packaging script only placed all_events.json.xz in an events/
subdirectory, but the firmware advertises the metadata URI at the
board directory top level. New build targets added after the
Jenkins-to-GHA migration had no legacy top-level copy, causing
QGC to get a 404 when fetching component metadata.

Fixes #26963

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-02 23:04:54 -06:00
PX4BuildBot
9cfd3a4506 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-03 01:03:39 +00:00
Ramon Roche
4281faa98a fix(docs): correct image path case mismatch in cuav_x25-evo pages
The asset file was renamed from X25-EVO.jpg to x25_evo.jpg in git but
all four locale files (en, ko, uk, zh) still referenced the old name.
macOS hid this because its filesystem is case-insensitive, but Linux CI
(case-sensitive) intermittently failed to resolve the reference during
Rollup bundling.

Fixes #26958

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-02 18:56:52 -06:00
PX4BuildBot
5189d42d68 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-02 23:37:34 +00:00
Jacob Dahl
9b6e7cb800
fix(ekf2): allow optical flow to start when range finder is height reference (#26960)
When EKF2_HGT_REF=2 (range sensor) with no GPS, optical flow could
never start. The starting condition required isTerrainEstimateValid()
or isHorizontalAidingActive(), but terrain is never "estimated" when
range is the height reference (ground is the datum, terrain state is
fixed at 0), and there's no horizontal aiding without GPS.

HAGL is directly known from the range measurement in this case, so
optical flow has everything it needs to fuse. Add the range height
reference check to the optical flow starting conditions.

Fixes: https://github.com/PX4/PX4-Autopilot/issues/25248
2026-04-02 15:30:24 -08:00
PX4BuildBot
ed387555e9 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-02 21:10:45 +00:00
Ramon Roche
dd03e18fee ci(packaging): publish container images with :latest tag
Add :latest tag alongside version tags for per-arch images and
multi-arch manifests on both Docker Hub and GHCR.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-02 15:03:04 -06:00
Ramon Roche
1079c57fd0 build(packaging): add PX4 SITL .deb packages
Add cmake/cpack infrastructure for building .deb packages from
px4_sitl_sih and px4_sitl_default targets. Includes install rules,
package scripts, Gazebo wrapper, and CI workflow.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-02 15:03:04 -06:00
Julian Oes
ebe0b727d8
fix(kakuteh7-wing): fix BOARD_FLASH_SECTORS to protect param sectors (#26897)
Set BOARD_FLASH_SECTORS to 13 so the bootloader does not erase the
parameter sectors (14 and 15) during firmware updates. Previously set
to 14 which allowed the bootloader to erase sector 14, potentially
wiping stored parameters.
2026-04-03 09:22:48 +13:00
Anil Kircaliali
ad895f7010
fix(setup): pin setuptools version to resolve pkg_resources ModuleNotFoundError (#26956) 2026-04-02 20:04:40 +02:00
Ramon Roche
685f9248e4 fix(sbom): fix false positives in monthly license audit
Three issues caused the monthly audit to report already-resolved submodules:

1. The audit workflow grepped for "NOASSERTION" anywhere in the output,
   matching the Detected column even when the Final column had a valid
   override (e.g. libtomcrypt detected as NOASSERTION but overridden to
   Unlicense). Changed to grep for "<-- UNRESOLVED" marker instead.

2. Submodules with an explicit NOASSERTION override in license-overrides.yaml
   (like libfc-sensor-api, which is proprietary) were still counted as
   failures. Now treated as "acknowledged" since someone intentionally
   added the override entry.

3. Added missing BSD-3-Clause override for sitl_gazebo-classic (PX4 org
   project with no LICENSE file in repo).

Fixes #26932

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-02 11:15:30 -06:00
PX4BuildBot
0ffa4e72ac docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-02 14:27:39 +00:00
Marco Hauswirth
c8a1a38147 style(ekf2): minor style fixes 2026-04-02 16:20:19 +02:00
Marco Hauswirth
8624682db1 chore(boards): remove optical flow from holybro-kakutef7 build 2026-04-02 16:20:19 +02:00
Marco Hauswirth
4caee55a76 submodule(mavlink): update to latest mavlink/main to include ESTIMATOR_SENSOR_FUSION_STATUS, MAV_CMD_ESTIMATOR_SENSOR_ENABLE 2026-04-02 16:20:19 +02:00
Marco Hauswirth
fffc1b5d04 test(ekf2): sync EkfWrapper with FusionControl enabled flags
EkfWrapper now holds a FusionControl pointer and enables all sensors
by default. Sensor-specific enable methods also set fc.enabled = true.
2026-04-02 16:20:19 +02:00
Marco Hauswirth
6a7e39aa64 feat(mavlink): ESTIMATOR_SENSOR_FUSION_STATUS stream
Add MAVLink stream that maps EstimatorFusionControl uORB message to
ESTIMATOR_SENSOR_FUSION_STATUS, exposing per-sensor intended/active
bitmasks to the GCS.
2026-04-02 16:20:19 +02:00
Marco Hauswirth
6306c78f79 feat(ekf2): EKF2_SENS_EN param, SensEnBit enum, MAVLink fusion command
Add EKF2_SENS_EN bitmask parameter (replaces EKF2_EN_BOOT) with
per-sensor enable bits. initFusionControl reads SENS_EN while disarmed.
handleSensorFusionCommand sets FusionSensor.enabled via
VEHICLE_CMD_ESTIMATOR_SENSOR_ENABLE. syncSensEnParam writes back to
param on disarm. Update EstimatorFusionControl.msg to bool
intended/active fields. Update VehicleCommand.msg FUSION_SOURCE enum.
2026-04-02 16:20:19 +02:00
Marco Hauswirth
b9a1c429b3 refactor(ekf2): FusionSensor available/enabled/intended() data model
Split FusionSensor into available (CTRL param != disabled) and enabled
(runtime-toggleable). intended() = enabled && available. EKF core aid
sources now set available themselves and use intended() or _params
directly for CTRL-level checks. Remove drag/imu from FusionControl,
add aspd/rngbcn. Add AGP sourceFusingBitmask() for active-status.
2026-04-02 16:20:19 +02:00
Marco Hauswirth
0dd1640a54 feat(ekf2): enable fusion-ctrl toggle over mavlink cmd, CTRL param act only as reference 2026-04-02 16:20:19 +02:00
PX4BuildBot
2828162f72 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-02 09:56:18 +00:00
Nick
76eca4b7a4
feat(actuators): Control Flaps from AUX channel (#26913)
* feat(rc): flaps via AUX channel

* docs(actuators): add flaps and spoilers from RC

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

* docs(actuators): Update docs/en/payloads/generic_actuator_control.md

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>

* docs(actuators): move flaps setup docs

---------

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-04-02 11:48:44 +02:00
PX4BuildBot
0b621009d5 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-02 09:27:30 +00:00
alexcekay
56c69f4c07 fix(mavftp): don't use cache for other sys/comp ids 2026-04-02 11:20:23 +02:00
alexcekay
c7295c8a4f mtd: add px4_at24c_set_npages API 2026-04-02 10:59:08 +02:00
PX4BuildBot
3ba440c332 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-02 07:49:53 +00:00
Hamish Willee
b04518c0bc Apply suggestions from code review
Co-authored-by: Nick <145654544+ttechnick@users.noreply.github.com>
2026-04-02 09:42:29 +02:00
Hamish Willee
45abdb14b3 Apply suggestions from code review
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-04-02 09:42:29 +02:00
Hamish Willee
701ac9b257 docs(update): Safetly settings for changes in ESC timeout handling 2026-04-02 09:42:29 +02:00
PX4BuildBot
6db00a2326 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-02 07:35:28 +00:00
ttechnick
935a21d05c fix(fw_attitude_control): correct turn coordination 2026-04-02 09:28:44 +02:00
ttechnick
d2e3668ad9 fix(fw_attitude_controller): fix typo 2026-04-02 09:28:44 +02:00
PX4BuildBot
541ee6f81d docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-02 03:31:59 +00:00
CUAV Chen
8b870e364e
docs(docs): Update CUAV X25 Series Doc (#26882) 2026-04-02 14:24:42 +11:00
Ramon Roche
b142342c3a
ci(claude): add review-pr skill for domain-aware PR reviews (#26814)
* ci(claude): add review-pr skill for domain-aware PR reviews

Add a Claude Code skill that reviews pull requests with checks
tailored to the domains touched (estimation, control, drivers,
simulation, system, CI/build, messages, board additions).

Built from analysis of 800+ PR reviews across 8 PX4 maintainers.
Includes merge strategy recommendation, interactive dialog for
submitting reviews, and human-sounding PR comment formatting.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* ci(copilot): add domain-scoped review instructions for GitHub Copilot

Add .github/instructions/ files that give GitHub Copilot PR reviews
the same domain-aware context as the Claude Code review-pr skill.

Each file is scoped via applyTo to the relevant source paths:
core review, estimation, control, drivers/CAN, simulation, system,
CI/build, messages/protocol, and board additions.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* fix(claude): address Copilot review feedback

- Fix step reference in review-pr skill (step 8 -> step 9)
- Capitalize CMake consistently in skill and Copilot instructions

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

---------

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-01 17:56:23 -07:00
PX4BuildBot
f444402e6c docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-01 20:32:31 +00:00
Onur Özkan
0d18be5049
fix(scripts): replace hardcoded /bin/bash shebangs
Several helper scripts assumes bash is available at /bin/bash. That breaks on systems
such as NixOS, where bash is resolved from PATH instead of a fixed /bin location and
causes failures like `bad interpreter` during `make format`, e.g., on my host machine:

```sh
$ make format

/PX4-Autopilot/Tools/astyle/check_code_style.sh: /PX4-Autopilot/Tools/astyle/fix_code_style.sh: /bin/bash: bad interpreter: No such file or directory
```

This change switches these entrypoints to `#!/usr/bin/env bash` so they locate bash properly.

No functional changes intended.

Signed-off-by: Onur Özkan <work@onurozkan.dev>
2026-04-01 12:25:28 -08:00
PX4BuildBot
197a1a6214 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-01 13:08:32 +00:00
Marco Hauswirth
93955bd313 chore(gazebo): update gazebo-classic submodule, remove ranging-beacon from constrained-flash-boards 2026-04-01 15:01:31 +02:00