49002 Commits

Author SHA1 Message Date
ttechnick
00f952ed93 feat(fw_att_control): yaw error reallocation 2026-03-17 17:59:20 +01:00
ttechnick
7e5aca5540 feat(fw_att_control): magic numbers 2026-03-17 17:59:20 +01:00
ttechnick
fdf258c2aa docs(fw_att_control): update docs 2026-03-17 17:59:20 +01:00
ttechnick
11ffa179bb docs(fw_att_control): update docs 2026-03-17 17:59:20 +01:00
ttechnick
c4330f5a47 feat(fw_att_control): tilt-tracking controller 2026-03-17 17:59:20 +01:00
ttechnick
e370b3f4b8 feat(fw_att_control): Add Initial Quat Controller + Debug topic
This commit introduces a new control mode for fixed-wing aircraft that
utilizes Euler angles for attitude control.
Additionally, a new logged topic has been added to facilitate debugging and
monitoring of the Euler rates setpoints during flight.
2026-03-17 17:59:20 +01:00
Eric Katzfey
9136c66b7e fix(voxl2): Added explicit port identifier on gps start command 2026-03-17 09:03:32 -07:00
PX4BuildBot
2ca42e5252 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-16 23:14:52 +00:00
Jacob Dahl
1e5a485424
docs(dronecan): add SENS_GPS_PRIME guidance for moving baseline GPS heading (#26769)
Recommend setting SENS_GPS_PRIME to the moving base CAN node ID
when using dual antenna GPS heading. The rover receiver in a
moving baseline configuration can experience degraded navigation
rate and increased data latency when corrections are intermittent,
making the moving base the better primary position source.
2026-03-16 15:06:41 -08:00
Gennaro Guidone
00b27c56a8
fix(mixer_module): change MixingOutput to use float outputs (#26724)
* refactor(mixer_module): change MixingOutput to use float outputs

MixingOutput now passes float values to output drivers instead of
uint16_t. This removes the need for the 8192 offset encoding and
allows reversible motors to receive negative values directly.

* fix(mixer_module): fix float safety issues

-EscClient and voxl2_io: replace outputs[i] with fabs(outputs[i]) > 0.fto fix compilation issues
-GZMixingInterface: add explicit double cast to prevent compilation error
-PWMSim: replaced unit16 cast with lroundf given that now motors outputs can be negative and casting a negative float to unit16 is undefinder behaviour
-mixer_module: same fix of PWM (unit126 cast on negative float is undefined behaviour)

* refactor(mixer_module): float rounding suggestions

* fix(pwm_sim): fix inverted disarmed condition

* fix(mixer_module): more float rounding improvements

* fix(mixer_module_tests): use casting method which are now in drivers for rounding tests

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-03-16 14:59:53 -08:00
Jacob Dahl
26c9ca115f
fix(mathlib): rename euler312YawTest to match tested function (#26753)
* fix(mathlib): rename euler312YawTest to match tested function

The test calls getEuler321Yaw() but was named euler312YawTest.

Fixes #22103

* test(mathlib): add unit test for getEuler312Yaw

The existing test was named euler312YawTest but actually tested
getEuler321Yaw. Rename it and add a proper test for getEuler312Yaw
that verifies the quaternion and DCM overloads agree, and that
312 and 321 yaw match for a pure-yaw rotation.

Fixes #22103
2026-03-16 14:52:23 -08:00
Jacob Dahl
ba5b96edbe
fix(boards): correct GPIO_VDD_3V3_SENSORS_EN macro name (#26751)
* fix(fmu-v6c): correct GPIO_VDD_3V3_SENSORS_EN macro name

VDD_3V3_SENSORS_EN() referenced GPIO_VDD_3V3_SENSORS4_EN which
does not exist. The correct macro is GPIO_VDD_3V3_SENSORS_EN.

Fixes #26454

* fix(boards): rename VDD_3V3_SENSORS4_EN to VDD_3V3_SENSORS_EN

These boards have a single sensor power rail that was incorrectly
named SENSORS4_EN (copy-paste from boards with 4 rails). Rename
to SENSORS_EN to match the actual hardware.

Boards with legitimately numbered rails (fmu-v6xrt, x25-evo,
x25-super) are not changed.
2026-03-16 14:51:47 -08:00
Jacob Dahl
a107179ce7
fix(commander): fix baro calibration infinite loop (#26752)
In dd2322d622, the local PressureToAltitude(pressure_pa, temperature)
was replaced with the shared getAltitudeFromPressure(pressure_pa,
pressure_sealevel_pa), but the call sites continued passing temperature
where sea-level pressure was expected. This caused the binary search to
never converge, hanging "commander calibrate baro" indefinitely.

The original function used measured temperature in its hypsometric
equation. The replacement uses standard atmosphere temperature (15C)
internally, which is sufficient since the calibration computes a
relative offset against GPS altitude.

- Pass kPressRefSeaLevelPa as the second argument instead of temperature
- Remove the now-unused temperature accumulation
- Replace unbounded while loop with iteration-capped for loop to prevent
  hangs from float precision stalls, matching VehicleAirData.cpp
2026-03-16 14:51:12 -08:00
Jacob Dahl
d04858efe0
fix(uavcan): silence DroneCAN DSDL compiler build warnings (#26757)
Fix Python DeprecationWarning for invalid escape sequence in pyratemp.py
and replace deprecated FindPythonInterp CMake module in libuavcan.
2026-03-16 14:49:21 -08:00
Jacob Dahl
0b2e554202 refactor(voxl_esc): pass vehicle_control_mode_s and led_control_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl
7d9484e7a6 refactor(flight_mode_manager): pass follow_target_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl
37745a97d3 refactor(navigator): pass PositionYawSetpoint and loiter_point_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl
6f7ae9b5e5 refactor(navigator): pass mission_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl
43174bbf39 refactor(navigator): pass mission_item_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl
aba4bbb1ab refactor(fw_mode_manager): pass position_setpoint_s by const reference 2026-03-16 14:48:13 -08:00
PX4BuildBot
346690ba75 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-16 22:07:50 +00:00
Ege Kural
113853f631
fix(ci): enable clang-tidy bugprone-unhandled-self-assignment / cert-oop54-cpp (#26767)
Signed-off-by: kuralme <kuralme@protonmail.com>
2026-03-16 13:59:06 -08:00
PX4BuildBot
ed58a83a5c docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-15 19:50:02 +00:00
Jacob Dahl
71e673bec2
fix(mc_rate_control): remove redundant uORB copy in rate setpoint path (#26755)
Subscription::update() already copies data into the destination buffer,
making the subsequent copy() call redundant. This eliminates an
unnecessary memcpy every cycle on the 400 Hz rate control loop.
2026-03-15 11:43:23 -08:00
PX4BuildBot
9535559025 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-14 20:58:23 +00:00
Jonas Eschmann
6f023d4c23
bumping mc_raptor blob submodule (to include license) (#26750) 2026-03-14 13:51:42 -07:00
PX4BuildBot
082beb885d docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-14 09:25:59 +00:00
Matthias Grob
6b5147110b
refactor(commander): remove needless parameter COM_KILL_DISARM (#26736) 2026-03-14 01:09:28 -08:00
Matthias Grob
576e336849
refactor(commander): remove useless parameter COM_FLT_PROFILE (#26735) 2026-03-14 01:07:34 -08:00
PX4BuildBot
74408c0558 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-14 09:03:45 +00:00
Matthias Grob
0e9d563570
fix(mavlink): limit ADSB transponder reporting to 5Hz to not spam the link (#26733)
Note that internally higher update rates are likely also not useful but this needs to be carefully checked with the interface. It seems like the ADSB driver keeps track of what to publish when which is not a scalable/well-testable solution.
2026-03-14 00:57:07 -08:00
Ramon Roche
50dabd8fae docs(project): add CITATION.cff with Zenodo DOI
Add a CITATION.cff file so GitHub shows a "Cite this repository"
button. Lists the project founder and "The PX4 Contributors",
linking to the Zenodo concept DOI (10.5281/zenodo.595432).

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 18:17:15 -07:00
Ramon Roche
f5d9491c6a docs(project): add OpenSSF Best Practices badge to README
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 18:17:15 -07:00
PX4BuildBot
8316d026e1 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-14 01:15:31 +00:00
Ramon Roche
e303e4ccfb mavlink: log handler cleanup: remove unused filepath and opendir
- Use %*s in state_listing() to skip filepath that was parsed but never used
- Remove unused opendir()/closedir() in log_entry_from_id()

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 18:08:29 -07:00
Ramon Roche
616b25a280 mavlink: fix stack buffer overflow in log handler filepath parsing
- Size LogEntry.filepath to PX4_MAX_FILEPATH instead of hardcoded 60 bytes
- Add width specifier to sscanf calls to prevent buffer overflow
- Move platform defines from .cpp to .h for reuse
- Add static_assert to enforce scanf width < buffer size at compile time

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 18:08:29 -07:00
Ramon Roche
f11e2106af fix(ci): remove deprecated v1 cache API from container build
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 has broken container builds on main since March 12.

Removing the explicit version=1 parameter lets buildkit auto-detect
the v2 protocol, which is the only version now supported by both
GitHub (since April 2025) and RunsOn.

First build after this change will have a cold cache.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 13:59:54 -07:00
PX4BuildBot
2f3b7b7967 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-13 18:56:01 +00:00
Drone-Lab
4820a7d936
fix(navigator): fix bug in DO_CHANGE_ALTITUDE
Co-authored-by: Nathaniel-hl <3181616004@qq.com>
2026-03-13 10:48:06 -08:00
PX4BuildBot
ff1e898b72 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-13 17:56:44 +00:00
Ramon Roche
73884312da 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>
2026-03-13 10:49:02 -07:00
Jacob Dahl
b8610ca6f4 fix(nxp/linker): remove deprecated function signatures 2026-03-13 17:46:31 +01:00
bresch
cdcdd1096f fix(ekf2): add missing in_transition flag 2026-03-13 17:46:31 +01:00
bresch
acab9fdceb chore(ekf2): update change indicator
Initialization slightly changes as no zero innovation update is used
anymore
2026-03-13 17:46:31 +01:00
bresch
074e787a91 feat(ekf2): remove zero innovation heading update
This is no longer necessary with the heading observability check
2026-03-13 17:46:31 +01:00
bresch
643c6fec24 feat(ekf2): clear heading correlation with other states when not observable 2026-03-13 17:46:31 +01:00
Ramon Roche
2d79b9ea38 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 09:39:05 -07:00
Ramon Roche
afd327b322 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 09:34:27 -07:00
Ramon Roche
1009268d31 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 09:31:20 -07:00
Ramon Roche
4e6e2c059c 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 09:31:20 -07:00