28964 Commits

Author SHA1 Message Date
Matthias Grob
8bb82c70ee escCheck: structure suggestions 2026-03-12 18:30:51 +01:00
Matthias Grob
0071699348 HealthChecks: correct indentation for EVENT metadata 2026-03-12 18:30:51 +01:00
Matthias Grob
54df6d64a6 Commander: move FD_ACT_EN to esc check 2026-03-12 18:30:51 +01:00
Matthias Grob
7207c34c5b Commander: avoid leaking health checks into failure detector 2026-03-12 18:30:51 +01:00
Matthias Grob
8bafcfbac7 Rename parameters file for ESC checks 2026-03-12 18:30:51 +01:00
Matthias Grob
2ff83e7e7c escCheck: rename MOTFAIL_TOUT -> MOTFAIL_TIME and further cleanup 2026-03-12 18:30:51 +01:00
Matthias Grob
035ccc8395 FailureDetector: disarm again with ESC failures during spoolup 2026-03-12 18:30:51 +01:00
Matthias Grob
7d84911668 FailureDetector: remove obsolete subscriptions 2026-03-12 18:30:51 +01:00
ttechnick
4e279b16c2 uavcan: optimization and edge cases 2026-03-12 18:30:51 +01:00
ttechnick
c5652b2084 escChecks: param reorg
Reorganise parameters
fix esc & motor indices
set failsafe flags
2026-03-12 18:30:51 +01:00
ttechnick
03fc051c29 uavcan:fix check 2026-03-12 18:30:51 +01:00
ttechnick
96c5c7ba02 work on: feed back checks to commander 2026-03-12 18:30:51 +01:00
ttechnick
e9874b6f05 ensure motor faults are cleared 2026-03-12 18:30:51 +01:00
ttechnick
15f5a18629 uavcan: cleanup 2026-03-12 18:30:51 +01:00
ttechnick
b2ea7ffab6 fd: reorganise motor & esc failures 2026-03-12 18:30:51 +01:00
ttechnick
9f978b05f3 uavcan: unify timeout handling 2026-03-12 18:30:51 +01:00
Hamish Willee
7e776a7b9c
fix(docs): src_parser.py keep empty lines in param desciption (#26656) 2026-03-11 20:29:53 -07:00
Jacob Dahl
55b62e5f2b fix(mavlink): use >= for depth check to match MAX_DEPTH semantics 2026-03-11 19:50:36 -07:00
Jacob Dahl
8d99569643 fix(mavlink): bound recursion depth in delete_all_logs
Prevent potential stack overflow from symlink loops or deeply nested
directories by capping recursion to 3 levels. Also fixes dot-entry
skipping to use strcmp instead of prefix check, and deduplicates the
filepath construction.
2026-03-11 19:50:36 -07:00
ttechnick
05d94b9820 feat(px4io): enable pwm center 2026-03-11 19:50:52 +01:00
Ege Kural
d72d99f2d8
fix(ci): clang-tidy bugprone-too-small-loop-variable(#26709) 2026-03-11 08:18:53 -07:00
vertiq-jack
a2808a991c
fix(vertiq): Parameter Setting Reliability Update (#26521)
Updates to the backend to allow faster and more reliable parameter configuration.

---------

Co-authored-by: Jordan <jordan.leiber@vertiq.co>
2026-03-11 08:08:05 -07:00
Balduin
e5071beaa3 fix(ekf2): fuse airspeed in both transition if above EKF2_ARSP_THR 2026-03-11 10:08:32 +01:00
Daniel Hadlow
454b690c4b Height fusion now only rotates ev samples if they are FRD 2026-03-10 11:14:51 +01:00
yulianoifa-mobius
358574f9f6
feat(mavlink): mavlink signing support (#25284)
* Applying PR #17084

* Comitting missing changes

* Adding incoming SETUP_SIGNING handling

* Adding proper message decoding for SETUP_SIGNING

* Adding persistance of sign key in chunks of 32 bits into parameters

* Allowing SETUP_SIGNING to be handled only on usb_uart

* Removing unused type and variable

* Changing the default for Mavlink Timestamp

* Fixing styling

* Merging

* Merging submodules

* Replacing parameters with sdcard storage for secured key and ts

* Fixing styles

* Isolating signing related items in separate class

* Adding new files

* Syncing with main

* Fixing styles

* Changing the signing logic to work only if key and ts properly initialized, adding store the ts on stop

* Updated submodules to latest versions

* Updated gz to proper version

* libfc-sensor-api to proper version

* libcanard to proper version

* Updated fuzztest to proper version

* Updated public_regulated_data_types to proper version

* Updated mip_sdk to proper version

* Updated pydronecan to proper version

* Updated rosidl to proper version

* Fixing styles

* Fixing cyclonedds version

* initializing sign control in the member declaration

* Update src/modules/mavlink/mavlink_main.h

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>

* Fixing comments

* Fixing duplicate method

* Fixing defines

* Fixing styles

* Fixing the define errors

* replace duplicate logic with write_key_and_timestamp() function

* add docs

* Update docs/en/mavlink/message_signing.md

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

* Update src/modules/mavlink/mavlink_sign_control.cpp

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

* Update src/modules/mavlink/mavlink_sign_control.h

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

* Update docs/en/mavlink/message_signing.md

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

* rename to MAV_SIGN_CFG, fix copyright dates, fix docs SHA type, rename secrets file

* fix newlines

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-03-09 12:47:03 -08:00
Marco Hauswirth
48b6ec84bd
fix(simulation): use correlated gauss-markov noise for SIH-GPS (#26697) 2026-03-09 11:39:29 -08:00
Mathieu Bresciani
1a0b7dae9d
fix(ekf2): remove heading corrections from gravity fusion (#26694) 2026-03-09 11:31:44 -08:00
Eric Katzfey
6fd3c88bb0 voxl_esc: Add VOXL_ESC_T_ON param for MAVLink turtle mode button mapping
Add a new parameter to map a MAVLink MANUAL_CONTROL button to turtle
mode activation. When the manual control data source is a MAVLink
instance, the driver uses the buttons field directly instead of aux
channels. When the source is RC, the existing aux channel behavior
via VOXL_ESC_MODE is preserved. Set to -1 (default) to disable.
2026-03-09 11:56:33 -07:00
Balduin
029edb50b3 refactor(control_allocation): Clarify and enforce that motors are in matrix 0 2026-03-09 17:10:32 +01:00
Balduin
b6164107d1 refactor(control_allocation): Make type alias for actuator bitmask 2026-03-09 17:10:32 +01:00
Balduin
af3cfaea25 fix(control_allocator): Apply stopped motors before slew
So transitions between stopped/not stopped respect the slew rate.

 - Remove previous stopped motor handling in publish_actuator_controls
 - Replace with handle_stopped_motors, called in Run() before slew
 - Introduce ApplyNanToActuators in ControlAllocation to stop
 - Refactor ice shedding slightly to fit new structure
2026-03-09 17:10:32 +01:00
Balduin
44b2d8f845 feat(control_allocation): Handle NaN correctly in slew rate 2026-03-09 17:10:32 +01:00
Balduin
ee636a0e3d refactor(control_allocator): Remove slew rate from ice shedding
Will be unified with main output slew rate in commit just after
2026-03-09 17:10:32 +01:00
ttechnick
1dadd92a86 refactor(mavlink): reword mission transfer timeout 2026-03-09 16:26:41 +01:00
Marco Hauswirth
3e396f65e5
fix(navigator): fix alt setpoint after home-alt reset (#26662)
fix(navigator): skip mission alt update for non-position items
2026-03-09 15:39:21 +01:00
Jacob Dahl
26969c25ff
fix(uavcan): close directory before processing files in migrateFWFromRoot (#26676)
migrateFWFromRoot held the SD root directory open via opendir/readdir
while performing heavy file I/O (getFileInfo, copyFw, unlink) inside the
loop. Between readdir calls the FAT semaphore is released, allowing
other tasks (e.g. logger) to dirty the shared FAT sector cache. When
the next FAT operation needed a different sector, fat_fscacheflush
would write the dirty data followed by an immediate read — triggering
a write-busy to read transition in the SDMMC WRCOMPLETE path that
kills the SD card on STM32H7.

Split into two phases: first collect .bin filenames with the directory
open, then close it before doing any file I/O. This also fixes a
missing closedir on the mkdir error path and avoids modifying directory
entries (via unlink) while iterating them with readdir.
2026-03-06 12:32:57 -07:00
Jeff Katz
5cdf5ac482
fix(commander): calibration CPU starvation on linux (#26608)
On Linux targets with high-rate external sensor data (>1000Hz), all
sensor calibrations (gyro, accel, mag) can freeze PX4 by starving
other threads of CPU. Normal flight is unaffected — only calibration
triggers the problem.

Two compounding issues in the calibration worker threads:

1. calibrate_cancel_check() creates a new uORB::Subscription on every
   call, which triggers getDeviceNodeLocked() — an O(n) linear strcmp
   scan through all uORB nodes. In gyro/mag calibration this was called
   on every sensor sample, consuming the majority of CPU in strcmp alone.

2. SubscriptionBlocking::updatedBlocking() returns immediately when data
   is already available (it only blocks when no data is pending). With
   continuous high-rate sensor data, the calibration loops never yield,
   spinning at 100% CPU.

These problems are addressed with this patch as follows:

- Throttle calibrate_cancel_check() to once per 200ms in gyro
  and mag calibration loops.

- Add 1ms px4_usleep() yield before updatedBlocking()/updateBlocking()
  in all calibration loops (gyro, accel, mag, orientation detection).
  This caps the effective loop rate at ~1000Hz — still far above what
  calibration needs (250-750 samples).

- Force Commander main loop to sleep during calibration so it does not
  compete with calibration worker threads for CPU.

Tested under Linux (x64, aarch64) both with RT and non-RT scheduling,
with sensor data arriving at ~3600Hz. Calibration completes normally
and no longer results in a deadlocked process.
2026-03-06 10:11:24 -09:00
Nick
ce828af85c
actuators: remove function from center param (#26517)
* fix center parameter metadata

* revert module_schema

---------

Co-authored-by: Beat Küng <beat-kueng@gmx.net>
2026-03-06 09:00:52 +01:00
Luka Filipovic
6558928069
zenoh: fix default config topic type to use actual uORB topic name (#26564) 2026-03-05 17:32:14 -09:00
Jacob Dahl
5500ebb1d0
uavcan: gnss: do not require RTK fix for heading validity (#26649) 2026-03-05 10:22:44 -09:00
Phil-Engljaehringer
010f6dcbae
Refactor PCA9685 (#26379)
* refactor: use parseDefaultArguments

* style: reverted changes to docs (should be auto-generated)

* refactor: use parseDefaultArguments

* style: reverted changes to docs (should be auto-generated)
2026-03-05 15:31:12 +01:00
Balduin
16d938cda9
Ice shedding: fix docs rendering (#26616)
In the CA_ICE_PERIOD param description, a '>' was at the start of a
line. This is interpredeted by markdown as a quotation type indented
block which applies not only to that line, but to all following ones.
Changing the line breaks to only occur after full stops fixes it.
2026-03-05 20:25:40 +11:00
Hamish Willee
7c4c773858
Docs beginner tutorials update (#26639)
* docs: module_template.md accuracy fix

* Modernise and Fix up Hello sky example

* Corrections

* Apply suggestions from code review

* Apply suggestions from code review

* Fix up indentation
2026-03-05 20:18:57 +11:00
Balduin
fa2d1c3662
SIH Simulator: Add wind (#26467)
* SIH: explicitly use local velocity for all aerodynamic calculations

no functional change

* SIH: add param & vars for wind and apparent vel

no functional change

* SIH: replace all relevant vels with apparent vel

Only places where _v_E is remaining:
 - ecefToNed to calculate _v_N
 - generate_rover_ackermann_dynamics
 - equations_of_motion
 - parameters_updated, init_variables
and _v_N:
 - ecefToNed
 - print_status
 - publish_ground_truth
 - generate_rover_ackermann_dynamics
 - equations_of_motion
 - parameters_updated, init_variables

which are all not relevant for aerodynamics.

* sih: wind review suggestions

* sih wind: switch direction to global wind source direction convention

* SIH: clean up variable declarations

* SIH: rename variables for consistency

* docs: SIH: document new wind parameters

* Release notes: note for SIH wind settings

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-03-05 08:53:39 +01:00
CUAV Chen
9228dca9bd
drivers: imu: Add in ADIS16607 IMU Device (#26301)
* drivers: Add  in ADIS16607 IMU Device

* formatting and style, adjust debug output

* Change variable types of accel_x/y/z and gyro_x/y/z.

* Remove periodic register check

---------

Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-03-04 22:15:39 -09:00
Jacob Dahl
c677cb75df
fix(heater): don't turn heater on when controller time is zero (#26659)
When the PI controller computed zero on-time (e.g. temperature already
above target), the heater was still momentarily turned on every cycle
before being immediately turned off. Skip the on/off toggle entirely
when the computed on-time is zero.
2026-03-04 21:12:13 -07:00
Jacob Dahl
b4d5eca3c0
fix(dataman_client): fail fast when dataman is unavailable (#26652)
* fix(dataman_client): fail fast when dataman is unavailable

Check client_id before every DatamanClient operation to avoid waiting
for a response timeout when dataman was never running.

- Adds CLIENT_ID_NOT_SET guard to all sync and async methods
- Avoids cross-module linkage between dataman_client lib and dataman module

Supersedes #26128

* better init
2026-03-04 16:13:11 -09:00
Jacob Dahl
88a57c5b65 logger: add sensor_gnss_relative to High Rate Sensors 2026-03-04 10:10:16 -09:00
Leonardo Cencetti
de9698e7fa
zenoh: Add support for ROS2 Humble and earlier (#26619)
* Add support for hash-less Zenoh topic key expressions

- Add kConfig option ZENOH_KEY_TYPE_HASH to toggle the inclusion
- Update topic and liveliness generators

* chore: Update Zenoh kConfig param description and help message

* docs(zenoh): Document Zenoh configuration for Humble

* docs: Clarify PX4 ROS2 Interface library compatibility
2026-03-04 10:00:58 -09:00
Matthias Grob
ebc2093e52 Parachute check: clarify error message and parameter description wording 2026-03-04 17:42:28 +01:00