Commit Graph

49551 Commits

Author SHA1 Message Date
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
PX4BuildBot
3965d84e64 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-17 03:35:20 +00:00
Jacob Dahl
a8a545deae fix(dshot): downgrade 'serial telemetry lost' to debug log (#27118)
The warning spams the console during disarmed retries. Demote to
PX4_DEBUG so it remains available when debugging without flooding
normal operation.
2026-04-16 19:18:36 -08:00
PX4BuildBot
0118043b6b docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-16 23:20:04 +00:00
Jacob Dahl
30cd555f62 docs(pwm_out): list supported protocols in timer param description (#27101)
Mention PWM, OneShot, DShot, and Bidirectional DShot in the long
description so users can discover the parameter by searching for
keywords like "bidirectional" or "dshot" in QGC.
2026-04-17 09:12:10 +10:00
PX4BuildBot
a3924f0b24 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-16 15:49:47 +00:00
mahima-yoga
b5ef93ec04 fix(gain_compression): guard against NaN inputs 2026-04-16 17:39:03 +02:00
PX4BuildBot
4c0c09bd77 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-16 13:52:37 +00:00
alexcekay
2ad00e40b0 uavcan: allow board to override hw name 2026-04-16 15:40:27 +02:00
PX4BuildBot
a257f47822 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-16 09:50:29 +00:00
romain-chiap
6e35ca37e3 docs(sih): Enhance SIH and Flight Controller Hardware documentation (#27040) 2026-04-16 19:35:57 +10:00
PX4BuildBot
4f511d8908 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-16 03:46:58 +00:00
Hamish Willee
b3fbf37fae ci(docsorchestrator): Update to latest markdown link checker and link fixes (#27098) 2026-04-16 13:39:28 +10:00
PX4BuildBot
2af5a2c921 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-16 03:11:16 +00:00
zebulon-86
d439ae9e28 feat(boards/px4_fmu-v6c): add support for LSM6DSV16X (#26951)
* feat(drivers): add ST LSM6DSV16X IMU driver

Add a new SPI driver for the ST LSM6DSV16X 6-axis IMU with FIFO-based
accel, gyro, and temperature acquisition.

The driver supports continuous FIFO mode with tagged sample parsing,
DRDY interrupt triggering via FIFO threshold, and dynamic watermark
configuration based on the selected sample rate. It also falls back to
scheduled polling when a GPIO interrupt is not available.

To improve robustness, the driver periodically validates critical
register settings and limits FIFO draining per cycle.

Tested on Pixhawk6C with ground testing and flight validation.

* feat(boards/px4_fmu-v6c): add LSM6DSV16X support for Pixhawk6C

Enable the ST LSM6DSV16X as an alternative probe-based IMU on
Pixhawk6C.

The sensor is configured on SPI1 with chip-select PC13 and shares the
same CS and DRDY lines as the ICM42688P across all supported hardware
revisions. Board startup first probes the ICM42688P and then the
LSM6DSV16X, so only the IMU populated on a given board is started.

This change enables the LSM6DSV16X driver in the board configuration,
registers the device type in `spi.cpp`, and adds board sensor probing
for the new IMU.

Use rotation `-R 26` (`ROTATION_PITCH_180_YAW_90`) to match the sensor
orientation on the Pixhawk6C PCB.

* fix(drivers/lsm6dsv): address review comments

- add missing #include <cstddef> for size_t
- check FIFO status transfer() return value
- fix FIFO word count to sample period conversion (DIFF_FIFO reports
  words, not sample periods; each sample period is 2 words)
- fix drv_sensor.h macro alignment (spaces to tab)

* drv_sensor: move LSM6DSV devtype into IMU range

* fmu-v6c: use quiet LSM6DSV fallback probe
2026-04-15 20:04:00 -07:00
Farhang
e9a8bc804b feat(boards): fmu-v6x: reduce I2C4 GPIO speed from 50MHz to 25MHz (#26434)
* fmu-v6x: reduce I2C4 GPIO speed from 50MHz to 25MHz

Lower the I2C4 SCL/SDA GPIO slew rate to 25MHz to improve signal
integrity and reduce EMI on the I2C4 bus.

* Overriding speed bits

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-15 12:23:51 -08:00
Pavel Guzenfeld
2a69f92bb1 fix(uxrce_dds_client): fix session reconnection after agent restart (#26848)
* fix(uxrce_dds_client): fix session reconnection after agent restart

When the Micro XRCE-DDS Agent is restarted (e.g. via systemd or
Docker), the PX4 client stays "Running, disconnected" forever and
never re-establishes the session. Three bugs prevented reconnection:

1. session.on_pong_flag was never reset after being checked. Once set
   to 1 by the first successful pong, it stayed 1 forever, causing
   checkConnectivity() to believe pings were still succeeding even
   after the agent was gone. Fixed by resetting to 0 after reading.

2. _subs->reset() was never called during session teardown. Stale
   uORB file descriptors from the previous session persisted across
   reconnection attempts, causing the new session's publishers to
   malfunction. Fixed by calling _subs->reset() in deleteSession().

3. _connected was not explicitly reset in deleteSession(). While the
   outer loop checked this flag, explicitly clearing it ensures clean
   state for the next reconnection attempt.

Closes #26022

Signed-off-by: Pavel Guzenfeld <pavelgu@gmail.com>

* fix(uxrce_dds_client): clear fds[].events in reset() for reconnection

Without clearing events, init() skips orb_subscribe() on reconnect
because the POLLIN guard (fds[idx].events == 0) is never true again.
This causes all fds to remain at -1, px4_poll() returns 0, TX rate
stays zero, and the client enters a disconnect/reconnect loop.

Reported-by: sansha (tested on Pixhawk 6X with serial transport)

* ci: re-trigger SITL tests (flaky offboard test)

* docs(uxrce_dds_client): explain why reset() clears fds[].events

---------

Signed-off-by: Pavel Guzenfeld <pavelgu@gmail.com>
2026-04-15 12:20:43 -08:00
PX4BuildBot
bd939f087f docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-15 07:55:57 +00:00
Hamish Willee
71fffb0a42 docs(fix): Revert the link to dev call (#27090) 2026-04-15 17:48:21 +10:00
PX4BuildBot
8d03ec6824 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-14 23:47:37 +00:00
Jonas Perolini
83f2b96954 fix(navigator): goToNextPositionItem skip loops when required (#26993) 2026-04-15 09:40:13 +10:00