* 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>
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.
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
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.
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.
* refactor: use parseDefaultArguments
* style: reverted changes to docs (should be auto-generated)
* refactor: use parseDefaultArguments
* style: reverted changes to docs (should be auto-generated)
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.
* 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>
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.
* 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
* test: add StickYaw unit test for unaided_yaw NaN transition bug
Adds a functional gtest that verifies the yaw setpoint does not jump
discontinuously when unaided_yaw transitions from finite to NaN.
Reproduces the bug fixed in #25710.
* test(StickYaw): clarify unaided_yaw NaN root cause in test comment
NaN originates from corrupted IMU delta_angle propagating through
OutputPredictor::calculateOutputStates() Euler extraction.
* navigator:MissionFeasibility rename checkFixedWindLandApproach() to checkFixedWingLandApproach()
Renames checkFixedWindLandApproach() to checkFixedWingLandApproach() to fix a typo in the function name.
This improves code readability and makes the function name consistent with the intended FixedWing landing approach logic, without changing behavior.
* navigator:MissionFeasibility rename checkFixedWindLandApproach() to checkFixedWingLandApproach()
Renames checkFixedWindLandApproach() to checkFixedWingLandApproach() to fix a typo in the function name.
This improves code readability and makes the function name consistent with the intended FixedWing landing approach logic, without changing behavior.
* heater: add multi-instance support, refactor parameter handling, remove legacy params file
This change introduces multi-instance heater support to allow independent temperature control for multiple IMUs.
Main changes:
- Add support for multiple heater instances
- Refactor parameter handling to use per-instance parameters
- Remove the legacy parameter file and migrate to the updated parameter structure
This improves scalability and makes heater configuration consistent across setups with multiple sensors.
* Refactor heater configuration across multiple boards
- Updated heater GPIO definitions to introduce a new naming convention for better clarity and consistency.
- Replaced `GPIO_HEATER_OUTPUT` with `GPIO_HEATER1_OUTPUT` and adjusted the corresponding output enable macros.
- Changed parameter names from `SENS_TEMP_ID` to `HEATER1_IMU_ID` in various board default configurations to reflect the new heater setup.
- Ensured all affected board configurations are updated to maintain functionality with the new heater definitions.
* heater: fix missing HEATER1_OUTPUT_EN control
* heater: fix more missing HEATER1_OUTPUT_EN control
* heater: tidy config, docs, and instance handling
- Remove unused controller period member and use CONTROLLER_PERIOD_DEFAULT
- Improve HEATER${i}_IMU_ID description and instance-related logging/behavior
- Add a guard when HEATER_NUM exceeds HEATER_MAX_INSTANCES
Note: drop intermediate/reverted change around the 'celsius' spelling.
* heater: refactor constructor to remove unused parameter and add instance name function
- Remove unused ModuleParams argument from Heater constructor
- Add heater_instance_name() helper to provide per-instance work queue task names
- Use instance-specific parameter lookup (HEATER{n}_*) during initialization
Use heater_instance_name() to label each instance (heater_1/2/3) in work queue.
Also drop unused ModuleParams argument from constructor and keep per-instance
parameter handle lookup in initialization.
* format
* board: update GPIO configuration for multiple heater instances, add HEATER_NUM for boards using PX4IO
* heater: update heater control to use HEATER1_OUTPUT_EN when using PX4IO for consistency
* heater: add a TODO for px4io multi-instance
* heater: update missing GPIO_HEATER1_OUTPUT in sky-drones
* heater: fix multiple newlines at EOF (resolve CI check failure)
* heater: switch to PublicationMulti for heater_status and log multi-instance
- Changed _heater_status_pub from Publication to PublicationMulti to support independent per-instance publications without overwriting.
- Updated logged_topics.cpp to use add_optional_topic_multi("heater_status")
This fixes the issue where multiple heater instances were writing to the same heater_status topic, causing data overwriting and incorrect update rates in logs.
---------
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
* Fixes potential bug if unaided yaw becomes nan during execution:
if unaided yaw becomes nan during execution the yaw correction would jumpt to 0 causing a large jump in yaw
the change removes this jump by holding the current yaw correction instead
* Remove Python extra paths from settings.json
Removed Python extra paths from VS Code settings.
Fix logic error where `mnt_mode_in` (value) was checked against `PARAM_INVALID`
instead of `param_handle`. This caused `param_get` to be called with an invalid
handle if the parameter was missing.