Commit Graph

49571 Commits

Author SHA1 Message Date
PX4BuildBot
14529d6af3 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-21 08:50:19 +00:00
gguidone
d8d3bee738 docs(update): fix Remote ID failsafe trigger description 2026-04-21 10:42:57 +02:00
Hamish Willee
c55267107a docs(update) - subedit 2026-04-21 10:42:57 +02:00
gguidone
4fee468f3f docs: add Remote ID in-flight failsafe documentation
Update safety.md, remote_id.md, and releases/main.md to document the extended COM_ARM_ODID parameter  and the new in-flight failsafe behaviour that will be introduced in PX4 v1.18.
2026-04-21 10:42:57 +02:00
gguidone
6e980423e5 feat(commander): add Remote ID in-flight failsafe
Extend COM_ARM_ODID into a unified arming + in-flight failsafe parameter (0 = Disabled, 1 = Warning, 2 = Return, 3 = Land, 4 = Terminate)

Values >= 2 block arming and trigger the configured action if Remote ID
is lost while airborne.
2026-04-21 10:42:57 +02:00
PX4BuildBot
fa5381ab90 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-21 07:17:25 +00:00
bresch
ca1fdb24af fix(fw rate ctrl): override reset_integral when in acro mode 2026-04-21 09:09:41 +02:00
PX4BuildBot
3d19221188 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-21 05:21:22 +00:00
Jacob Dahl
68083e6ba8 test(pid): add regression test for derivative-on-measurement sign (#27153)
PIDTest never exercised the D path with a non-zero gain, which let the
sign error fixed in #27140 slip through. Add a D-only test that asserts
the output opposes a known feedback ramp.

Fails on main, passes with #27140.
2026-04-20 21:07:47 -08:00
Nathaniel-hl
1a689214cd fix(navigator): fix navigator_mission_item origin field assignment (#27146)
* fix:use _gps_pos.timestamp for validity check in geofence_breach_check

navigator: use _gps_pos.timestamp for validity check in geofence_breach_check
Co-Authored-By: Drone-Lab <151698793+drone-lab@users.noreply.github.com>

* Revert "fix:use _gps_pos.timestamp for validity check in geofence_breach_check"

This reverts commit aa9f557536.

* fix(navigator): fix navigator_mission_item origin field assignment

Co-Authored-By: Drone-Lab <151698793+drone-lab@users.noreply.github.com>

---------

Co-authored-by: Drone-Lab <151698793+drone-lab@users.noreply.github.com>
2026-04-20 21:07:16 -08:00
Eurus
bf1e6ec208 ekf2: fix external heading accuracy-to-variance conversion for yaw reset (#27143)
Co-authored-by: AkaiEurus <1826983968@qq.com>
2026-04-20 21:06:15 -08:00
PX4BuildBot
d19698e2d7 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-21 04:59:49 +00:00
Eurus
404b357782 fix(navigator): fix navigator_mission_item origin field assignment (#27137)
* navigator: fix navigator_mission_item origin field assignment

* navigator: fix navigator_mission_item origin field assignment in rtl_direct

---------

Co-authored-by: AkaiEurus <1826983968@qq.com>
2026-04-20 20:52:22 -08:00
PX4BuildBot
54b04db6e7 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-21 03:24:13 +00:00
Michael Fritsche
23b15d55d9 fix(pid): fixed typo in PID output calculation (#27140) 2026-04-20 19:17:08 -08:00
PX4BuildBot
98a4d20685 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-20 23:23:08 +00:00
Ramon Roche
9c2e634325 build(macos): make gz SITL work out-of-box after homebrew 4.5
The px4-sim / px4-sim-gazebo Homebrew meta-formulae can no longer
pull their Gazebo dependency chain because Homebrew 4.5+ stopped
auto-resolving cross-tap deps. PX4/homebrew-px4#104 already
deprecated px4-dev into a no-op; #111 does the same for the sim
formulae. This PR is the PX4-side counterpart: move the sim install
into Tools/setup/macos.sh with an explicit package list and tap
registration, mirroring the pattern already used for the toolchain
block. Adds xquartz install on --sim-tools.

Beyond install, three runtime and configure gaps kept make px4_sitl
gz_x500 from working on a clean macOS:

- gz-gui8 (pulled in by gz-sim8) links against Qt5, but Homebrew's
  qt@5 is keg-only so CMake cannot find it. Add a POSIX-scoped hint
  in platforms/posix/cmake/px4_impl_os.cmake that resolves
  brew --prefix qt@5 and appends it to CMAKE_PREFIX_PATH. No-ops on
  non-APPLE builds and respects a user-set Qt5_DIR.

- On macOS, dyld does not search /opt/homebrew/lib by default.
  gobject-introspection typelibs reference libs by bare basename,
  causing gst-plugin-scanner to fail to load plugins and adding
  ~90s of timeout to Gazebo's cold start. Set
  DYLD_FALLBACK_LIBRARY_PATH to the Homebrew prefix lib dir in
  gz_env.sh so the bridge launch inherits it. Darwin-scoped, no
  effect on Linux or CI.

- configure_file on gz_env.sh.in now uses @ONLY so shell ${VAR}
  references pass through untouched.

Verified locally on macOS 26.4 / arm64 / Homebrew 5.1.7: configure
clean, 1119/1119 targets compile and link, vehicle spawns in
Gazebo Harmonic 8.11.0 with a single "Waiting for Gazebo world"
wait (was ~18 before the dyld fix).

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-20 16:15:41 -07:00
Dima Timofeev
059da2fcf7 fix(simulation): fix macOS gz SITL build
Add the GStreamer pkg-config library directories so the Gazebo camera plugin links cleanly with Homebrew installs on macOS. Cast ESC actuator outputs to double before publishing rotor velocities to avoid clang's -Wdouble-promotion build failure.

Signed-off-by: Dima Timofeev <dimkat@gmail.com>
2026-04-20 16:15:41 -07:00
Ramon Roche
67cb65f237 build(msg): disable SSL and Security in the host-side CycloneDDS build
The nested CycloneDDS CMake invocation in msg/CMakeLists.txt exists
only to produce the 'idlc' IDL compiler as a host-side code-gen
tool. It does not need CycloneDDS's TLS transport or DDS Security
features, but both default to ON in cyclonedds' upstream CMake.

When ENABLE_SSL=AUTO (the default), cyclonedds finds the system
OpenSSL and builds ddsi_ssl.c. On macos-latest the system OpenSSL
is 3.x, which removed the deprecated SSL_get_peer_certificate()
symbol used in our pinned cyclonedds revision (2023). The host
build then fails at link time with:

  Undefined symbols for architecture arm64:
    "_SSL_get_peer_certificate", referenced from:
        _dds_report_tls_version in ddsi_ssl.c.o

This broke every Zenoh-enabled board build on macOS (boards that
select CONFIG_MODULES_ZENOH pull in LIB_CDRSTREAM, which is what
triggers the nested build). v5 and v6x never hit it because they
don't enable Zenoh.

Passing -DENABLE_SSL=OFF -DENABLE_SECURITY=OFF skips compilation of
ddsi_ssl.c and the security plugins entirely. idlc is unaffected
(pure C code generation, no DDS runtime).

Verified locally on macOS ARM64: clean distclean + make
px4_fmu-v6xrt_default completes in 2090/2090 ninja steps, producing
a 2.1 MB .px4 with 59% FLASH used.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-20 16:12:32 -07:00
Ramon Roche
bfa66b514b fix(tflm): vendor third-party deps to enable reproducible builds
tflite-micro's Makefile fetches 5 third-party dependencies (flatbuffers,
kissfft, gemmlowp, ruy, pigweed, plus CMSIS/CMSIS-NN for ARM targets)
via wget and git clone at build time. This breaks reproducible builds:
the build output depends on GitHub and pigweed.googlesource.com being
reachable and serving the exact pinned archives, which is not guaranteed
and has broken in the past when GitHub silently regenerated archive zips.

Bump the tflite_micro submodule to the new px4/vendored-deps branch on
PX4/tflite-micro, which commits the deps directly under
tensorflow/lite/micro/tools/make/downloads/. Upstream's download scripts
already no-op with "already exists, skipping the download" when the
target directories are present, so no Makefile patches are needed.

Drop the add_custom_command, build_tflm_native target, and the empty
generate_cc_arrays.py shim from CMakeLists.txt. They existed solely to
drive the (now-removed) make third_party_downloads invocation and to
overwrite the submodule's generate_cc_arrays.py to keep that invocation
quiet. With the download step gone, none of that machinery is needed,
and the submodule stays clean after a build.

Verified builds against the new submodule:
- px4_sitl_neural (linux/amd64 devcontainer)
- mro_pixracerpro_neural (linux/amd64 devcontainer)
- px4_fmu-v6xrt_allyes (linux/amd64 and linux/arm64 devcontainers)

Fixes #27054

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-20 16:12:04 -07:00
PX4BuildBot
fefafa3eb0 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-20 16:53:46 +00:00
Kristiyan Dimitrov
b5e632ccf4 build(macos): add Python venv support to setup script (#26702)
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Co-authored-by: Ramon Roche <mrpollo@gmail.com>
2026-04-20 09:45:54 -07:00
PX4BuildBot
9b45769878 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-20 07:02:22 +00:00
Balduin
dbd3adc145 fix(airspeed_selector): fix invalid array access after airspeed failure
The array access

    _airspeed_validator[valid_airspeed_index - 1]

is only valid if valid_airspeed_index > 0. After an airspeed failure, we
have valid_airspeed_index = -1 (see AirspeedSource enum definition) and
are thus accessing array element -2. This is UB and pollutes the log
(and potentially other modules) with garbage values.

Fix: Like already done for other fields, we initialise the values with
NaN and only populate (using the array access) when the airspeed source
is a real sensor, and thus valid.
2026-04-20 08:55:30 +02:00
PX4BuildBot
4159d94ac1 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-20 03:35:44 +00:00
Jacob Dahl
52b2546046 fix(ekf2): correct EV orientation variance inflation and NE aiding check (#26622)
Replace dimensionally wrong max(pos/vel_var, orientation_var) floor
with physically correct additive variance from the cross-product
δp = δθ × p (and δv = δθ × v). The old code compared rad² directly
to m² or (m/s)², ignoring lever arm / speed.

Also include EV position (guarded by yaw_align) in
isNorthEastAidingActive() so that mag fusion doesn't spuriously
clear yaw_align when it stops during EV-only flight.

Supersedes #25703
2026-04-19 19:28:41 -08:00
PX4BuildBot
e7e1a7ec88 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-20 03:04:49 +00:00
Eurus
dd4213310f ekf2: fix published terrain reset delta (#27130) 2026-04-19 18:57:23 -08:00
Balduin
385828fcb3 feat(astyle): add option to only format diff with respect to HEAD (#27122)
* feat(astyle): add make format_changed for diff only style fixes

`make format` is pretty slow because it always considers the entire
source tree. For developing on top of a clean state, considering only
files that differ from HEAD should be sufficient.

* docs(astyle): document new format_changed target
2026-04-19 18:30:21 -08:00
Nanwan
3169dc6b1b fix(uxrce_dds_client): avoid stalls under high UDP load (#26161)
* uxrce_dds_client: avoid stalls under high UDP load

- Avoid double-close of transport fd on deinit\n- Reduce loop latency and drain inbound bursts\n- Batch best-effort output flush and handle buffer-full\n- Lower default uORB->DDS poll interval to allow higher /fmu/out rates

* Fix formatting of UxrceddsClient descriptor initialization
2026-04-19 18:26:42 -08:00
PX4BuildBot
372369fc83 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-20 02:15:40 +00:00
Jonas Perolini
a182072792 fix(various): Fix hardfaults when running out of memory (nullptr check) (#26516)
* Fix hardfault in mavlink stream strcpy

* prevent more OOM hardfaults

* revert mavlink fallback

* delete _interpreter in mc_nn_control module

* fix build

---------

Co-authored-by: jonas <jonas.perolini@rigi.tech>
Co-authored-by: Julian Oes <julian@oes.ch>
2026-04-19 18:08:39 -08:00
PX4BuildBot
300e368e65 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-19 23:09:12 +00:00
PX4 Build Bot
7ab709c202 docs(i18n): PX4 guide translations (Crowdin) - zh-CN (#27066)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-04-20 09:01:48 +10:00
PX4BuildBot
0a4070b5c2 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-19 04:03:02 +00:00
PX4 Build Bot
c6e1903184 docs(i18n): PX4 guide translations (Crowdin) - ko (#27064)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-04-19 13:50:51 +10:00
PX4 Build Bot
8f723ad5f5 docs(i18n): PX4 guide translations (Crowdin) - uk (#27065)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-04-19 13:50:24 +10:00
ZeroOne-Aero
35a94343d6 feat(boards/zeroone-x6): Add BMM350 compass compatibility 2026-04-18 13:21:19 -07:00
PX4BuildBot
045d5569ee docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-18 20:16:53 +00:00
Ramon Roche
a6d1822521 build(macos): inline homebrew deps in setup script, drop px4-dev meta-formula
Homebrew 4.5 (April 2026) stopped auto-tapping cross-tap
dependencies declared in formulae, as a security + performance
change. The px4-dev meta-formula pulled in packages from
osx-cross/arm, PX4/px4, and discoteq/discoteq, so 'brew install
px4-dev' now aborts before any real work unless every tap has been
added explicitly. On macos-latest CI runners the chain broke at the
first unreachable dep (discoteq/discoteq/flock) and subsequent make
steps failed with 'ccache: command not found'.

Since Tools/setup/macos.sh is the canonical install path and already
tapped osx-cross/arm and PX4/px4 before calling brew install, the
simplest fix is to inline the package list and call brew install
directly. The px4-dev meta-formula will be kept upstream as a
deprecated no-op so older copies of macos.sh on long-lived branches
and cached Docker images keep working.

The inlined package list is the same set px4-dev depended on, minus
the dead-weight flock dependency that hadn't been invoked in the PX4
build since the NuttX 9.1.x era. See the accompanying PX4/homebrew-px4
PR for formula changes.

Docs updated to match: docs/en/dev_setup/dev_env_mac.md no longer
names the px4-dev formula, describes the package list directly.

Verified locally on macOS ARM64:
- ./Tools/setup/macos.sh runs to completion with both taps and all 13
  packages resolving correctly
- make distclean && make px4_fmu-v6x_default builds successfully
  (1250/1250 ninja steps, 1930096 B FLASH used)

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-18 13:04:26 -07:00
PX4BuildBot
32398d6abf docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-18 19:54:24 +00:00
Jacob Dahl
b3c825d0f9 chore(tests): remove dead integration test utilities with zero references
- integrationtests/python_src/px4_it/util/manual_input.py: last meaningful change 2019, 0 refs
- integrationtests/python_src/px4_it/util/px4_test_helper.py: last meaningful change 2016, 0 refs
2026-04-18 12:47:15 -07:00
Jacob Dahl
774732768e fix(lpe): remove stale comment referencing deleted fault_table.py 2026-04-18 12:47:15 -07:00
Jacob Dahl
be60797c70 chore(ci): remove Jenkinsfile superseded by GitHub Actions
All Jenkinsfile functions are now covered by GitHub Actions:
- Metadata generation → docs-orchestrator.yml + metadata_sync.sh
- PX4-user_guide deploy → in-repo docs/ + docs-orchestrator.yml
- S3 upload → build_all_targets.yml artifacts job
- QGC metadata push → already broken (no metadata commits)
- uORB graphs → supported by metadata_sync.sh

Co-authored-by: mrpollo <317648+mrpollo@users.noreply.github.com>
2026-04-18 12:47:15 -07:00
Jacob Dahl
ffa8134cac chore(tools): remove dead scripts and files with zero references
Remove files that have zero references in the codebase and haven't been
meaningfully touched in years:

- Tools/stack_usage/avstack.pl: AVR stack checker (2017), wrong arch, 0 refs
- Tools/usb_serialload.py: USB serial load tester (2022), Python 2, 0 refs
- Tools/dist/vehicle_configs.xml: old vehicle configs (2015), deprecated mixer format, 0 refs
- Tools/models/sdp3x_pitot_model.py: SDP3x pitot model (2017), 0 refs
- Tools/Matlab/motors.m: MATLAB motor script (2015), 0 refs
- Tools/Matlab/plot_mag.m: MATLAB mag plotter (2015), 0 refs
- src/modules/local_position_estimator/fault_table.py: fault table gen (2018), LPE disabled, 0 refs
- integrationtests/python_src/px4_it/util/flight_path_assertion.py: old ROS1 util (2016), 0 refs
- integrationtests/python_src/px4_it/util/TODO.md: stale TODO (2016), 0 refs
- integrationtests/python_src/px4_it/dronekit/: DroneKit mission checker (2019), deprecated lib, 0 refs
- platforms/posix/src/px4/common/lockstep_scheduler/build-and-test.sh: standalone build (2019), replaced by CMake, 0 refs

Co-authored-by: dakejahl <37091262+dakejahl@users.noreply.github.com>
2026-04-18 12:47:15 -07:00
kuralme
f5957d046b fix(ci): enable clang-tidy misc-header-include-cycle
Signed-off-by: kuralme <kuralme@protonmail.com>
2026-04-18 12:39:39 -07:00
PX4BuildBot
19049f740f docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-17 18:25:10 +00:00
Ivan Zivotic
dbcf2bb26c fix(mavlink): add send timeout to UDP socket to avoid infinite waiting on UDP IOB on NuttX (#26988)
Co-authored-by: Ivan Zivotic <ivan@sunflower-labs.com>
2026-04-17 10:17:06 -08:00
Jacob Dahl
3419fa66bb fix(drivers/imu/invensense): force bank 0 at probe startup (#27117)
After a soft reset with a non-zero bank selected, _last_register_bank
is default-initialized to 0 but the hardware state is unknown. Register
reads then skip the bank select (cached value matches) and read from
the wrong bank, so probe fails and the device stays stuck until a power
cycle.

Force bank 0 at the start of each probe retry so the first transfer
synchronizes the cached bank with hardware. Drop the post-fail bank
inspection — it's no longer reachable.

Applies to all multi-bank Invensense drivers: IIM42652, IIM42653,
ICM42688P, ICM42605, ICM40609D, ICM20948 (main and I2C passthrough),
ICM20649. ICM45686 and ICM42670P have a single bank and are unaffected.

Takes over PR #25894 from @spiderkeys.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-04-17 10:16:41 -08:00
alexcekay
977cb5fe25 mtd: fix registration of multiple ONCHIP devices 2026-04-17 18:18:16 +02:00