48057 Commits

Author SHA1 Message Date
Ramon Roche
3b84cdbdbe ci(container): harden dev_container workflow against cache-export flakes
Three related fixes to prevent a repeat of the v1.17.0-rc2 incident, where a
post-push GHA cache-export 404 failed the arm64 build after both registry
pushes had already succeeded, fail-fast cancelled amd64, and the deploy job
was skipped, leaving the registries with only a partial arm64 publish and no
multi-arch manifest.

- Mark cache export as non-fatal via ignore-error=true on cache-to. A
  successful registry push should never be undone by a cache-layer flake.
  This alone would have let rc2 publish correctly.

- Decouple the deploy job from the build job's exit code. Change its if:
  gate to !cancelled() + setup success only, and promote the existing
  "Verify Images Exist Before Creating Manifest" step from a warning into
  a hard precondition. Deploy now runs whenever both per-arch tags actually
  exist in the registries, which is its real precondition, and fails loudly
  if a tag is missing.

- Bump every action to the current major (runs-on/action v2,
  actions/checkout v5, docker/login-action v4, docker/setup-buildx-action v4,
  docker/build-push-action v7, docker/metadata-action v6). This gets the
  workflow off Node 20 before GitHub's June 2 2026 forced runtime switch
  and keeps runs-on/action on the same major as the runs-on platform.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
(cherry picked from commit d74db56a060ee333535e29c765074572f73f0139)
2026-04-07 18:22:39 -06:00
Jacob Dahl
54ab3158c5 fix(ekf2): allow optical flow to start when range finder is height reference
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-03 19:53:58 -06:00
Silvan
fab7cbda8d fix(npfg): use NFPG_DAMPING and NPFG_PERIOD to calculate directional p gain
Signed-off-by: Silvan <silvan@auterion.com>
2026-03-19 16:54:11 +01:00
Ramon Roche
39b0568ea4 fix(ci): remove deprecated v1 cache API from container build
Backport of #26742 to release/1.17.

RunsOn v2.12.0 (March 6, 2026) removed v1 cache toolkit support,
causing the buildx GHA cache proxy to return 404 for v1 endpoints.
This broke the v1.17.0-rc2 container build.

Removing the explicit version=1 parameter lets buildkit auto-detect
the v2 protocol.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 15:59:48 -07:00
Ramon Roche
0b6e4687de fix(mavlink): remove all stale mavlink_tests references
The mavlink_tests module was deleted in 1009268d311 but several
references were left behind, breaking builds on all targets.

Removed:
- CMakeLists.txt: add_subdirectory(mavlink_tests)
- mavlink_ftp.cpp: #include of deleted mavlink_ftp_test.h
- mavlink_ftp.h: MavlinkFtpTest forward decl and friend class
- posix-configs/SITL/init/test/test_mavlink: dead init script
- sitl_tests.cmake: sitl-mavlink CTest target
- install-voxl.sh: px4-mavlink_tests symlink

Ref: https://github.com/PX4/PX4-Autopilot/issues/26738
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
v1.17.0-rc2
2026-03-13 12:30:05 -07:00
Ramon Roche
69a6b9eee6 fix(zenoh): validate payload size before stack allocation
Reject Zenoh payloads that exceed the expected uORB topic size plus
CDR header (4 bytes), or that are too small to contain a valid CDR
header. This prevents a stack overflow from crafted network input
where z_bytes_len(payload) controls a VLA allocation.

Fixes GHSA-69g4-hcqf-j45p

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 12:30:05 -07:00
Ramon Roche
b5b48536a3 fix(mavlink): correct session validation in FTP write and burst operations
Use logical OR (||) instead of AND (&&) in _workWrite() and _workBurst()
session validation, matching the correct logic already used in _workRead()
and _workTerminate(). The AND operator allowed operations to proceed with
an invalid session ID as long as a valid file descriptor existed.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 12:30:05 -07:00
Ramon Roche
3bd06cc02f refactor(mavlink): remove dead FTP unit test code
Remove the old MAVLINK_FTP_UNIT_TEST infrastructure that has been dead
code for years (not enabled in any board config). This includes:

- src/modules/mavlink/mavlink_tests/ directory (test suite, CMakeLists)
- All #ifdef MAVLINK_FTP_UNIT_TEST blocks in mavlink_ftp.cpp
- set_unittest_worker() callback mechanism in mavlink_ftp.h
- Conditional uAvionix include in mavlink_bridge_header.h

The test suite will be ported to GTest as a follow-up.

Ref: https://github.com/PX4/PX4-Autopilot/issues/26738
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 12:30:05 -07:00
Ramon Roche
48335ac3f1 fix(mavlink): reject path traversal sequences in FTP operations
Add _validatePath() that rejects paths containing ".." components,
preventing directory traversal outside the FTP root directory.
Applied to all FTP operation handlers (list, open, remove, truncate,
rename, mkdir, rmdir, CRC32).

Fixes GHSA-fh32-qxj9-x32f, GHSA-pm28-2j4f-8jxv

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 12:30:05 -07:00
Ramon Roche
9605d8dce8 fix(tattu_can): validate CAN frame bounds before buffer copy
Add bounds checking in the CAN frame assembly loop to prevent a buffer
overflow when copying payloads into the Tattu12SBatteryMessage struct.
A crafted CAN frame with a corrupt payload_size could write past the
48-byte struct boundary. Also guard against payload_size of 0 which
would cause an unsigned integer underflow on the size_t subtraction.

Fixes GHSA-wxwm-xmx9-hr32

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 12:30:05 -07:00
Ramon Roche
3d63672c03 fix(telemetry/bst): validate reply length and dev_name_len before use
Reject replies with length >= sizeof(BSTPacket) to prevent OOB read
in CRC calculation. Clamp dev_name_len to buffer size to prevent OOB
write during null termination.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 12:30:05 -07:00
Ramon Roche
61904bc14a ci: fix S3 upload so tags don't overwrite stable firmware
Remove the step that uploaded every version tag to the stable/ S3
directory, which caused QGC users selecting "stable" to receive
pre-release firmware (#26340). The stable/ and beta/ directories
are now controlled exclusively by their respective branch pushes,
while version tags only upload to their versioned archive directory
(e.g., v1.16.1/). Pre-release tags are also correctly marked on
GitHub Releases.

Co-authored-by: Julian Oes <julian@oes.ch>

Fixes #26340

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
v1.17.0-rc1
2026-02-13 07:25:28 -08:00
Matthias Grob
fd68d5d043 CI: replace all usage of addnab/docker-run-action
It's unmaintained and the docker version it uses is not supported anymore.
2026-02-13 06:35:09 -08:00
Nick
857b48d57d
[1.17] Bugfix: Prevent Offboard to Position without RC (#26391) 2026-01-30 09:35:49 +01:00
AkaiEurus
618995da84 Fix VTOL stuck after back-transition in Mission Fast RTL 2026-01-22 13:55:38 +01:00
Nick
2a78d7dfd1 pwm: Add PWM center support to Wheel and Gimbal (#26211)
* Add Wheel and Gimbal support to PWM center

* Document Center feature for PWM Gimbal
2026-01-22 13:53:45 +01:00
Nick
da89d5e939 PWM: Add servo center setting & asymetric deflection (#25897)
Add PWM_*_CENTERx for each servo.
Use a bilinear transform to map actuator_servos to PWM signals.

This solution only works for PWM based servos. Other types of servos are not affected.

* PWM: Add servo trim option

* PWM: Improve documentation of PWM trim feature

* PWM: cleaner clamping and docs typo

* update documentation & safety

* add migration formula

* rename param from trim to center

* docs with center instead of trim

* move clamping and reorder values

* improve documentation

* adress failing range check

* improve documentation

* CA: add event for setting CENTER with TRIM

Signed-off-by: Silvan <silvan@auterion.com>

---------

Signed-off-by: Silvan <silvan@auterion.com>
Co-authored-by: Silvan <silvan@auterion.com>
2026-01-22 13:53:45 +01:00
Ryan Johnston
15f5fefa0c FW Takeoff: fix loiter altitude not set in some cases
* Fix Takeoff mode to respect MIS_TAKEOFF_ALT

Takeoff mode never transitions to hold after takeoff alt.

* style: run make format
v1.17.0-beta1
2026-01-16 18:04:40 +01:00
Matthias Grob
e841fe029a
[1.17] Bugfix: Let user take over from a degraded failsafe (#26269)
* astyle: remove max line length (#25717)

* failsafe unit test: add cases for 1 allow taking over from degraded failsafes 2 not cause immediate takeover when failsafe happens because of mode switch

The first test makes sure the user can take over when an RTL failsafe was triggered but degraded to a Land.

The second test rules out the easiest fix of removing the condition `_selected_action == selected_action` which causes the problem for test one but is there for a reason.

* commander/failsafe: fix user takeover not possible in fallback Land action when configured RTL is not possible

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2026-01-15 14:48:53 -05:00
Peter van der Perk
82532f9642
[BACKPORT 1.17] imxrt related fixes and mr-tropic support (#26052) 2025-12-23 15:10:07 -05:00
Peter van der Perk
77766d1301
[BACKPORT 1.17] Zenoh docs and zenoh oom fixes (#26053)
* docs: Zenoh middleware guide (#25737)

* Zenoh: Update zenoh-pico library

* Zenoh: Improve out-of-memory behaviour

Abort publication immediately when not enough memory is available.
Zero _zenoh_publishers and _zenoh_subscribers to ensure we're not
dereferencing a wrong pointer

* fmu-v6x: zenoh config set CONSTRAINED_FLASH

Fixes flash overflow with zenoh target on fmu-v6x

* Update docs/en/middleware/zenoh.md

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2025-12-09 19:03:26 -09:00
Niklas Hauser
c2fb48990a [FMUv6s] Communicate the correct board id version v1.17.0-alpha1 2025-10-15 14:25:31 +02:00
JoelJ18
4fa9aa205f
[Docs] MicroStrain driver documentation (#25376)
* Initial Draft

* prettier + parent INS doc addition

* Typo fixes and param description improvements

* LinkedFileMissingAnchor Fix

* External mag and optical flow doc update

* Reverting module.yaml

* Apply suggestion from @hamishwillee

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2025-10-15 19:04:51 +11:00
Hamish Willee
e83d18cad2
metadata - _sidebar and only display front page warning on main (#25761)
* _sidebar and only display front page warning on main

* Update metadata and fix internal flaws
2025-10-15 12:28:33 +11:00
Matthias Grob
2cae8ee797
Improve documentation for motor failure injection and detection (#25756)
* failure_injection: improve previously vague motor faulure

Reading it again I decided adding the sentance in 4d2170c13ea4d42c5b0b464dbbcbb68fb098cbcc is not clear enough.

* docs/safety: add a motor failure detection paragraph

The functionality is in my eyes pretty basic but so far completely undocumented so I went through the code and added a paragraph based on questions I received.

* Subedit

* Apply suggestion from @hamishwillee

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2025-10-15 11:05:33 +11:00
Jacob Dahl
a64536802b
gz: fix gimbal yaw, add dds publisher (#25754)
* gz: correct gimbal yaw

* uxrce_dds: add publisher /fmu/out/gimbal_device_attitude_status

* chore: use explicit ENU_to_NED rotation

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>

* format

---------

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
Co-authored-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2025-10-14 11:45:43 -08:00
Matthias Grob
babe094d06
FailureDetector: use robust timeout checks for motor failure detection (#25757) 2025-10-14 10:46:29 -08:00
Alexander Lerach
376f52f51d mavlink: add som/fmu config params 2025-10-14 19:14:41 +02:00
Alexander Lerach
0f0fe8f1fa boards: align auterion v6x with APX4 2025-10-14 19:14:41 +02:00
Niklas Hauser
9fa4a57c66 tools: Ignore known_hosts file for uploading via SSH 2025-10-14 19:14:41 +02:00
Niklas Hauser
ba1e658750 boards: remove USB device from Auterion FMUv6x 2025-10-14 19:14:41 +02:00
Alexander Lerach
e8fbc30cf6 boards: add auterion v6x target 2025-10-14 19:14:41 +02:00
Matthias Grob
7706aae67d mavlink_receiver: only switch outgoing MAVLink version to 2 if it was 1 before
to avoid the message that comes with it being spammed.
2025-10-14 18:38:02 +02:00
Matthias Grob
4842c542b8
rc_update: remove 1% deadzone for RC channels 1-8 (#25502)
* rc_update: remove 1% deadzone for all channels

this should be handled higher level.

* Remove all references to the RC{n}_DZ parameters

Regular expression: RC.{0,2}_DZ

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2025-10-13 21:41:11 -08:00
Matthias Grob
12035682d7
Use MAVLink v1 only as opt-in (#25583)
* Remove support for MAVLink 1

* Add back support for MAVLink 1 but don't default to it

* Update src/modules/mavlink/mavlink_params.c

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

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2025-10-13 20:58:34 -08:00
Matthias Grob
33301764e4
Handle SYS_AUTOSTART 0 the same as no valid airframe being available (#25645)
* ROMFS: do not exit airframe loading if SYS_AUTOSTART is 0

Do not treat 0 as a magic value that skips the aiframe loading.
Instead leave it tot he rc.autostart to load an airframe that if finds
appropriate (can be defined in external aiframe).

Signed-off-by: Silvan <silvan@auterion.com>

* ROMFS: adjust airframe load spacing and message/comment wording

---------

Signed-off-by: Silvan <silvan@auterion.com>
Co-authored-by: Silvan <silvan@auterion.com>
2025-10-13 20:56:27 -08:00
Ramon Roche
aa0668663a
docs: clean urls for vitepress builds (#25718)
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-10-13 20:52:41 -08:00
Marco Hauswirth
2f06f03728
calibration: mag: only allow mag calibration when at least one mag is available and enabled (i.e. not prio=0) (#25714) 2025-10-13 20:51:25 -08:00
Jacob Dahl
2c62caeb7d
flight task auto: fix offtrack mission landing bug (#25725)
During a mission the last waypoint is often a LAND. If the previous waypoint is not directly above the land waypoint the offtrack calculation is incorrect. This regression was introduced when the offtrack calculation switched from 2D to 3D.
2025-10-13 19:56:23 -08:00
PX4 Build Bot
87559f717b
New Crowdin translations - zh-CN (#25747)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-10-13 09:08:22 +11:00
PX4 Build Bot
7fb8ea051f
New Crowdin translations - uk (#25746)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-10-13 09:08:14 +11:00
PX4 Build Bot
dc500c4d04
New Crowdin translations - ko (#25745)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-10-13 09:08:00 +11:00
Alexander Sherikov
54679f11d0
px_update_git_header: fix nuttx version detection (#25742)
use fake nuttx version tag when the real one cannot be detected
2025-10-11 14:24:30 -08:00
Connor Denihan
9a6e4b5ace
docs: Fix capitalization of macOS (#25744)
* Fix formatting and capitalization in dev_env_mac.md

Updated formatting and capitalization for consistency in the macOS development environment documentation.

* Correct 'Mac OS' to 'macOS' in documentation

* Fix capitalization of 'macOS' in documentation
2025-10-11 14:23:55 -08:00
Connor Denihan
d6fc448a36
Update supported Ubuntu versions in dev environment docs (#25743) 2025-10-11 12:54:32 -08:00
Farhang
3336050f84 First commit 2025-10-10 11:29:01 -07:00
Mahima Yoga
96904636f3
commander: prevent setting nav_state to takeoff after disarming (#25735)
* commander: prevent setting nav_state after disarming to takeoff

* wrap in function
2025-10-10 09:59:26 -08:00
Peter van der Perk
edc7a2bb80
fmu-v6xrt: Add DTCM to heap (#25733)
Move ramvectors from DTCM to ITCM, this seems to better in general.
Also ITCM is marked as RO so is safer anyhow, now that DTCM is fully
unused we add DTCM region of 256kB to memory allocator. Increases usable
memory from 1536kB to 1792kB and decrease system load a bit since DTCM
is faster
2025-10-10 09:46:26 -08:00
Ramon Roche
2fba5b4c1a
ci: pull emscripten v4.0.15 to avoid c++17 errors (#25739)
https://github.com/emscripten-core/emscripten/issues/24850

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-10-10 09:43:20 -08:00
Jacob Dahl
12f6005c5c
romfs: allow target level airframe selection (#25677) 2025-10-10 11:29:27 -06:00