18456 Commits

Author SHA1 Message Date
Jacob Dahl
9c2e8aff0f
battery: remove unused param BAT_I_CHANNEL (#26590) 2026-03-02 13:28:14 -09:00
MaZeNHeKaL29
6bf4745144
navigator: MissionFeasibility: rename checkFixedWindLandApproach() (#26603)
* 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.
2026-03-02 13:24:41 -09:00
Matthias Grob
9cb3ea44fb
sih: cleanup initializing variables in constructor (#26578) 2026-03-02 13:22:35 -09:00
CaFeZn
963a776fa6
feat(heater): Add multi-instance support for heaters (#26325)
* 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>
2026-03-02 12:13:08 -09:00
Hamish Willee
9e41ffd537
docs:Fix in-source broken links in modules and airframes ref (#26611) 2026-03-02 18:18:00 +11:00
Jacob Dahl
1550c8d245 battery: remove analog_battery_params_deprecated.c 2026-02-27 19:33:05 -09:00
zhaosheng.tan
d495014878 mavlink: fix invalid param handle check in send_autopilot_capabilities
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.
2026-02-27 19:32:32 -09:00
Marco Hauswirth
fab9874183
Mavlink: GLOBAL_POSITION for aux positioning (#26307)
* mavlink: add GLOBAL_POSITION message handling
- Add handler for incoming GLOBAL_POSITION MAVLink messages
- Publish received positions to aux_global_position uORB topic
- Update GLOBAL_POSITION stream to use aux_global_position topic
* correctly handle multi AGP in mavlink pub
* move from GLOBAL_POSITION to GLOBAL_POSITION_SENSOR
* mavlink: update submodule to include GLOBAL_POSITION_SENSOR in common.xml
2026-02-27 17:50:45 +01:00
Marco Hauswirth
57a380d8ec ekf2: fix silent pass of preflt heading check if no heading src active 2026-02-27 13:26:47 +01:00
Alexander Lerach
9ff373c325
modules: add task watchdog (#26535)
* modules: add task watchdog

* modules: adapt task watchdog to new module descriptor

* add review feedback
2026-02-27 13:09:21 +01:00
Ege Kural
d317113dc8
CI: enable clang-tidy bugprone-assignment-in-if-condition (#26580)
* docs: auto-sync metadata [skip ci]

  Co-Authored-By: PX4 BuildBot <bot@px4.io>

CI: enable clang-tidy bugprone-assignment-in-if-condition

Signed-off-by: kuralme <kuralme@protonmail.com>

initialize and immediate assignments made one line

Signed-off-by: kuralme <kuralme@protonmail.com>

* two more initialization fix

Signed-off-by: kuralme <kuralme@protonmail.com>

---------

Signed-off-by: kuralme <kuralme@protonmail.com>
Co-authored-by: PX4BuildBot <bot@px4.io>
2026-02-27 00:04:45 -09:00
Jonas Perolini
bea52104b7
AirspeedValidator: fix course over ground computation for NED frame (#26304)
* AirspeedValidator, fix course over ground computation for NED frame

* fix potential out of bounds call

---------

Co-authored-by: jonas <jonas.perolini@rigi.tech>
2026-02-26 09:18:09 +01:00
bresch
5395b3823a ekf2: disable heading update in drag fusion 2026-02-25 15:40:01 +01:00
Hamish Willee
8a8496d57e
mavlink:COMMAND_INT - reject invalid frame (#26408)
* mavlink:COMMAND_INT - reject invalid frame

* Add msg version for new command and use

* Delete msg/px4_msgs_old/msg/VehicleCommandAck.msg:Zone.Identifier

* Fix up translation

* fix: translation_node build

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

---------

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
Co-authored-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2026-02-25 20:29:59 +13:00
Ege Kural
a5c67b90a9
CI: enable clang-tidy bugprone-incorrect-roundings (#26574)
switched to lroundf and included cmath in all



removed std namespace - quick tested

Signed-off-by: kuralme <kuralme@protonmail.com>
2026-02-24 13:16:33 -09:00
Ege Kural
207456fd35
CI: enable clang-tidy cppcoreguidelines-virtual-class-destructor (#26559)
* CI: enable clang-tidy cppcoreguidelines-virtual-class-destructor

Signed-off-by: kuralme <kuralme@protonmail.com>

* format fix

Signed-off-by: kuralme <kuralme@protonmail.com>

---------

Signed-off-by: kuralme <kuralme@protonmail.com>
2026-02-23 19:21:20 -09:00
Ege Kural
8fd3d3268a
CI: enable clang-tidy readability-duplicate-include (#26554)
Signed-off-by: kuralme <kuralme@protonmail.com>
2026-02-23 16:54:36 -09:00
Eric Katzfey
845a7efd58 voxl2: add system reboot support 2026-02-23 11:25:13 -07:00
Cavan O'Horo
039ac8c4c1
Fix double-promotion warning in gz_msgs on macOS (#26548)
Protobuf-generated code in gz_msgs triggers -Wdouble-promotion warnings
from the Abseil library. Since this is external code we cannot modify,
disable the warning for this specific target.

Fixes #26533
2026-02-21 18:25:00 -09:00
Tim
8f870a1346
BlueROV2 Height control Altitude Mode (#26364)
* removed commented out parts

* changed the height controller to work in Altitude mode and moved the controller to the uuv_pos_control.hpp instead of uuv_att_control.hpp

* Updated format changes etc. Removed one parameter, that is not used anymore(UUV_HGT_MODE) added my correct email

* added a rotation to the thrust, that with different roll and pitch values, x y z thrust is still working as if roll/pitch is zero.

* fixed constant roll/pitch to be 0.0 again

* added parameter for maximum distance between controlled des height and current height.
Added state observation to reset the desired height to current height when altitude mode is turned on.

* added first short descriptions of manual modes.

* update descriptions

* removed vector dependency

* feat: updated gz submodule

* fix: newline

* fix: gz submodule

---------

Co-authored-by: Pedro Roque <roque@caltech.edu>
2026-02-20 22:46:12 -08:00
Marco Hauswirth
17242bc1a4 simulation: update sensor_agp_sim for AuxGlobalPosition message
Update the AGP simulator to publish the new AuxGlobalPosition message
type with the required source ID field.
2026-02-20 17:43:45 +01:00
Marco Hauswirth
8a9be9a8f0 ekf2: update logger, mavlink, DDS, and replay for AuxGlobalPosition
Update integrations to use the new AuxGlobalPosition message instead
of the VehicleGlobalPosition-based aux_global_position topic.
2026-02-20 17:43:45 +01:00
Marco Hauswirth
b346fcfa00 ekf2: implement multi-instance AGP fusion
Refactor auxiliary global position fusion to support multiple AGP
sources. Add AgpSourceControl manager class that routes AGP messages
to the correct AgpSource instance based on configured source IDs.
Only instantiate AgpSource slots that have a configured ID on boot.
Move AGP subscriptions to manager class for correct message routing.
2026-02-20 17:43:45 +01:00
Marco Hauswirth
1d852907a2 ekf2: add multi-instance AGP parameters
Add per-instance parameters for auxiliary global position sources,
allowing configuration of up to 4 AGP slots with individual source IDs.
2026-02-20 17:43:45 +01:00
Eric Katzfey
7daac63809 muorb: A couple of minor tweaks to make initialization reliable 2026-02-20 08:42:04 -07:00
Matthias Grob
ca0dec5a33 uavcan esc handling review suggestions 2026-02-20 15:16:43 +01:00
ttechnick
8478503349 uavcan: remove redundant loop 2026-02-20 15:16:43 +01:00
ttechnick
6a18fd045f uavcan: cleanup & node_status fix
uavcan: esc fault handling review suggestions

uavcan: fix node status & cleanup
2026-02-20 15:16:43 +01:00
Balduin
918efc8f97
navigator: RTL: fix idle setpoint on activation (#26537)
When switching modes, navigator resets the position setpoint triplet to
idle. In the case of entering RTL, it is not replaced immediately by the
correct triplet, but published once and only corrected a split second
later. This causes zero thrust to come from control_idle in
FixedWingModeManager

Fix by calling run(true) on the appropriate sub-mode at the end of
RTL::on_activation(), same as in the on_active just below.

The submode is in inactive at that point, but run(true) triggers:
 - on_activation of the submode
 - set_rtl_item, which calls:
     - mission_item_to_position_setpoint
     - _navigator->set_position_setpoint_triplet_updated

and therefore the navigator publishes the position setpoint triplet
immediately (which was already being correctly set).

Navigator: RTL: also update subs on actiavation

Navigator: RTL: also disable mission RTL if direct RTL

matching the logic in on_active exactly
2026-02-20 14:51:51 +01:00
Jacob Dahl
d564c5b4c2
mag: calibration: bump default earth field strength from 0.2 to 0.4 (#26528) 2026-02-19 17:32:40 -07:00
Eric Katzfey
996060f581 muorb: Added statistics and status reporting. Improved aggregator send performance. 2026-02-19 14:57:17 -07:00
fakerror
6cf8d80bdd
rover: guard computeMaxSpeedFromDistance against disabled decel/jerk limits (#26452)
Co-authored-by: Andrew Brahim <35986980+dirksavage88@users.noreply.github.com>
2026-02-19 15:52:41 -05:00
Matthias Grob
0d66981dcc
Remove MPC_USE_HTE and always use hover thrust for altitude control (#24751)
* Remove `MPC_USE_HTE` and always use hover thrust for altitude control

Note the separate module can still be not run but I have not seen a case where the hover thrust estimate is not useful for altitude control hence I don't expect anyone to have the parameter disabled or planning on not running the module.

This parameter was used to experimentally introduce the hover thrust estimator. First it was just logging its status and you could opt in to use it:
f9794e99f897b842e74a370e5fa77c281aeddce5
but soon after it became the default and you had to opt out of using it:
a8063ac94867c2990b0a80c6fdf0dccc835c3356
AFAIK we haven't seen problems requiring to disable it in the last 5 years and hence I suggest to remove the parameter to reduce the configuration space.

* Update src/modules/land_detector/MulticopterLandDetector.cpp

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>

* undo docs changes

* change redundant update() calls to copy()

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-02-19 11:17:57 -09:00
Matthias Grob
62f5f5267e
Land detector: Remove LNDMC_TRIG_TIME parameter (#25251)
* LandDetector: remove unused LNDMC_TRIG_TIME parameter

* LandDetector: remove unnecessarily complicated global set_hysteresis_factor() function

* Apply suggestions from code review

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

* Apply suggestions from code review

* remove param

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-02-19 11:17:03 -09:00
Alex Klimaj
b8877c4cfc
Battery add configurable filter params (#26524)
* ark fpv board_config: update battery ADC current filter time constant to 0.5s

* battery: add configurable voltage and current filter time constants

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2026-02-18 18:20:50 -09:00
Jacob Dahl
ce3e62841f
module_base: remove CRTP template pattern to reduce flash bloat (#26476)
* module_base: claude rewrite to remove CRTP bloat

* module_base: apply to all drivers/modules

* format

* fix build errors

* fix missing syntax

* remove reference to module.h in files that need module_base.h

* remove old ModuleBase<T>

* add module_base.cpp to px4_protected_layers.cmake

* fix IridiumSBD can_stop()

* fix IridiumSBD.cpp

* clang-tidy: downcast static cast

* get_instance() template accessor, revert clang-tidy global

* rename module_base.h to module.h

* revert changes in zenoh/Kconfig.topics
2026-02-19 15:17:17 +13:00
Eric Katzfey
368dd362c5 muorb: implemented a basic keepalive mechanism 2026-02-18 12:59:45 -07:00
Silvan Fuhrer
06d6c31614
Allocation: fix flaperons and spoilerons (symmetric ailerons up/down) (#26514)
Signed-off-by: Silvan <silvan@auterion.com>
2026-02-18 10:49:26 -08:00
Farhang
50a42680d7
Update GZ Plugin OpticalFlow CMake configuration for library paths (#25957)
* Update OpticalFlow CMake configuration for library paths
2026-02-18 11:53:52 -05:00
Claudio Chies
05de941399 Add Traffic Avoidance System (ADSB/FLARM) Arming Check (#26390)
* Add traffic avoidance system checks

* Update msg/px4_msgs_old/msg/VehicleStatusV1.msg

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

* docs: add arming check for traffic avoidance systems in ADS-B/FLARM documentation

* fix formating

* trafficAvoidanceCheck: switch case for configuration options

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-02-18 17:37:03 +01:00
Matthias Grob
adc9a6d35d Report nav_state of mission executor via MAVLink 2026-02-18 17:37:03 +01:00
Matthias Grob
977777f40a FlightTaskAuto: refactor triplet subscription naming 2026-02-18 17:05:03 +01:00
Matthias Grob
4afdf38378 FlightTaskAuto: remove second internall triplet states 2026-02-18 17:05:03 +01:00
Matthias Grob
d0004403a3 FlightTaskAuto: remove offtrack logic
It was added at a time where the triplet target was directly fed as position setpoint to the controller.

Since the smoothing improvements to FlightTaskAuto(SmoothVel) and removing the previous "aggressive" FlightTaskAuto variant there should be no need anymore for this logic. It can sometimes lead to unexpected sideffects. E.g. the vehicle would suddenly change direction when exceeding some arbitrary threshold.
2026-02-18 17:05:03 +01:00
Jacob Dahl
b2fc5993cc
range_finder_consistency_check: fix consistency check timeout units (#26497)
* range_finder_consistency_check: fix consistency check timeout units

* explicit float

* format
2026-02-17 14:10:04 -09:00
Jacob Dahl
d5ddc9135d
clang-tidy: fix issues (#26498) 2026-02-17 14:09:43 -09:00
Silvan Fuhrer
11007dc893
FW auto launch: Add option to lock selected surfaces before/during launch (#25799)
* FWModeManager: add option to set flag for disabling actuators during launch

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

* Allocation: add option to each control surface to be locked for launch

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

* FW rate control: reset integral while control surfaces are locked

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

---------

Signed-off-by: Silvan <silvan@auterion.com>
Co-authored-by: mahima-yoga <mahima@auterion.com>
2026-02-17 09:26:38 +01:00
Claudio Chies
e52ce5c43b
UAVCAN: Configurable LED Light Control with Flexible Addressing (#26253)
* feat: implement UAVCAN LED control for individual light control and assignment

* uavcan led: nit-picks from review

* uavcan led: reduce maximum number of lights

to avoid unused parameters

* uavcan led: simplify anticolision on check

* uavcan led: correctly map 8-bit RGB to rgb565

* Trim param name character arrays to 17

16 characters + \0 termination

* uavcan led: final nit-picks

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-02-16 18:39:48 +01:00
nlsxp
302d0601bf
Smoothen external flight mode GotoControl to Mission transitions (#26254) 2026-02-13 14:06:47 +01:00
Ramon Roche
f29afe1342 logger: expand ULog unit tests to cover all message types
Rename ULogMessageInfoTest to ULogMessagesTest and add struct-level
coverage for every message type in the ULog spec:

- File header: magic bytes, size, field offsets
- Flag Bits ('B'): size, field offsets, flag masks
- Format ('F'): size, serialization
- Info ('I'): string, int32_t, and float value layouts
- Info Multiple ('M'): string layout, continuation flag, field offsets
- Parameter ('P'): int32_t and float value layouts
- Default Parameter ('Q'): size, type bits, field offsets
- Subscription ('A'): size, field offsets, serialization
- Unsubscription ('R'): size, serialization
- Data ('D'): size, field offset
- Logging ('L'): size, field offsets, serialization
- Logging Tagged ('C'): size, field offsets
- Sync ('S'): size, magic bytes
- Dropout ('O'): size, default msg_size, serialization
- Message header: size, field offsets, ULOG_MSG_HEADER_LEN
- Enum values: all 13 ULogMessageType codes

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00