2957 Commits
Author SHA1 Message Date
elisaaferraraa e308d6105d feat(reboot): new param to not exlcude CAL_* params on a param reset (#28110)
* feat(reboot): new param to reset also CAL_* params with reboot and SYS_AUTOCONFIG on

* refactor(reboot): SYS_AUTOCFG_CAL description shorter

* refactor(reboot): reset SYS_AUTOCFG_CAL

* refactor(reboot): swap lines to make SYS_AUTOCFG_CAL appear in params list even if not set default to anything
2026-08-05 15:56:42 +02:00
James Botwina 47ce421a88 fix(simulator_sih): restore xvert front transition (#28090)
Container build / Set Tags and Variables (push) Canceled after 0s
Container build / Build Container (amd64) (push) Canceled after 0s
Container build / Build Container (arm64) (push) Canceled after 0s
Container build / Deploy To Registry (push) Canceled after 0s
Docs - Orchestrator / T1: Detect Changes (push) Canceled after 0s
Docs - Orchestrator / T2: PR Metadata (push) Canceled after 0s
Docs - Orchestrator / T2: Metadata Sync (push) Canceled after 0s
Docs - Orchestrator / T2: Link Check (push) Canceled after 0s
Docs - Orchestrator / T3: Build Site (push) Canceled after 0s
Docs - Orchestrator / T4: Deploy (push) Canceled after 0s
Build all targets / Scan for Board Targets (push) Canceled after 0s
Build all targets / Seed [${{ matrix.chip_family }}] (push) Canceled after 0s
Build all targets / Build [${{ matrix.runner }}][${{ matrix.group }}] (push) Canceled after 0s
Build all targets / Upload Artifacts (push) Canceled after 0s
Checks / Gate Checks [check_format] (push) Canceled after 0s
Checks / Gate Checks [check_newlines] (push) Canceled after 0s
Checks / Gate Checks [module_documentation] (push) Canceled after 0s
Checks / Gate Checks [shellcheck_all] (push) Canceled after 0s
Checks / Gate Checks [validate_module_configs] (push) Canceled after 0s
Checks / Unit Tests (push) Canceled after 0s
MacOS build / build (push) Canceled after 0s
Ubuntu environment build / Build and Test (ubuntu:22.04) (push) Canceled after 0s
Ubuntu environment build / Build and Test (ubuntu:24.04) (push) Canceled after 0s
Failsafe Simulator Build / build (failsafe_web) (push) Canceled after 0s
ITCM check / Checking nxp_mr-tropic (push) Canceled after 0s
ITCM check / Checking nxp_tropic-community (push) Canceled after 0s
ITCM check / Checking px4_fmu-v5x (push) Canceled after 0s
ITCM check / Checking px4_fmu-v6xrt (push) Canceled after 0s
ROS Integration Tests / build (push) Canceled after 0s
ROS Translation Node Tests / Build and test [humble] (push) Canceled after 0s
ROS Translation Node Tests / Build and test [jazzy] (push) Canceled after 0s
SITL Tests / Testing PX4 quadx (push) Canceled after 0s
SITL Tests / Testing PX4 standard_vtol (push) Canceled after 0s
SITL Tests / Testing PX4 xvert (push) Canceled after 0s
FLASH usage analysis / Analyzing px4_fmu-v5x (push) Canceled after 0s
FLASH usage analysis / Analyzing px4_fmu-v6x (push) Canceled after 0s
Python CI Checks / build (push) Canceled after 0s
FLASH usage analysis / Publish Results (push) Canceled after 0s
Static Analysis / Clang-Tidy (push) Canceled after 0s
* fix(simulator_sih): correct tailsitter pitot axis

Signed-off-by: jbotwina <jimbotwina16@gmail.com>

* fix(airframes/10042): tune xvert transition

Signed-off-by: jbotwina <jimbotwina16@gmail.com>

* test(mavsdk_tests): cover xvert transition

Signed-off-by: jbotwina <jimbotwina16@gmail.com>

* fix(airframes/10042): disable airspeed scaling

Signed-off-by: jbotwina <jimbotwina16@gmail.com>

---------

Signed-off-by: jbotwina <jimbotwina16@gmail.com>
2026-07-29 13:01:51 -06:00
Phil-Engljaehringer 14b3f44081 feat(ufw): enable nfs mounting and flashing 2026-07-28 16:25:42 +02:00
Claudio Chies 282c969687 fix(commander): capture home orientation on ground independent of local position (#27946) 2026-07-21 11:49:06 -07:00
Julian Oes 28b7c7e970 fix(rcS): use awk instead of bc for scaled timeout math
bc isn't installed in the px4-dev CI container we now use. awk is
required by POSIX so it's always present. Same float math, no extra
dependency.
2026-07-17 10:51:42 -05:00
Julian Oes 92c6818fc5 fix(rcS): scale COM_DISARM_PRFLT by sim speed factor
Symmetric with the existing COM_DL_LOSS_T / COM_RC_LOSS_T /
COM_OF_LOSS_T / COM_OBC_LOSS_T scalings just above. At high simulation
speed the default 10s preflight disarm is reached much sooner in
real wall time than tests expect, so scale it the same way.
2026-07-17 10:51:42 -05:00
Claudio ChiesandClaudio Chies d63f30c612 feat(failure_injection): Enable failure-injection on hardware, and through RC-switch (#27832)
* feat(failure_injection): integrate failure injection support across sensor drivers

* feat(failure_injection): enhance failure injection with RC switch support and instance bitmasking

feat(failure_injection): add disabled failure injection manager and system command support for v5x and v6x boards

* feat(failure_injection): add battery failure injection

Add a value-mutating apply-site for FAILURE_UNIT_SYSTEM_BATTERY. On an
injected OFF the outgoing battery_status is reported as a depleted pack
(zero remaining, emergency warning) so the low-battery failsafe triggers.

The apply-site lives in the shared Battery library, covering the analog
ADC, INA power monitors, ESC battery and SITL in one place, plus the
UAVCAN battery driver which publishes battery_status directly. The
previous SITL-only hack in BatterySimulator is removed in favour of this
shared path so simulation and hardware behave identically.

* fix(failure_injection): change parameter types from int32 to enum

* refactor(failure_injection): disable failure injection manager and system commands across multiple boards

* feat(failure_injection): enhance failure injection with timestamp handling and message-less support

* refactor(failure_injection): simplify has_timestamp_sample implementation and remove unused includes

* refactor(failure_injection):move conditional compilation into helper libary

* refactor(failure_injection): update CMakeLists to include failure_injection dependency across multiple drivers

---------

Co-authored-by: Claudio Chies <chiesc@chies.com>
2026-07-15 07:56:13 -07:00
25b7d627da fix(ROMFS): Safe flash pruning more unnecessary characters from ROMFS (#27775)
* refactor(ROMFS): remove trailing zeros from all airframes

* refactor(ROMFS): remove allignment whitespace from all startup scripts

* feat(romfs_pruner): strip end of line comments in startup scripts

and airframes to not waste any flash.

* feat(romfs_pruner): strip inline multi-whitespace

* fix typo

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-01 11:53:21 -08:00
Balduin f17f70be6f fix(airframes/10042): correct sihsim_xvert sign error
The sihsim_xvert currently tumbles immediately on takeoff. Here is why:

generate_ts_aerodynamics in sih.cpp calculates elevon torques.
everything is rotated into the fixed-wing frame, in which
 - positive _u[4] (configured as CA_SV_CS0) generates positive FW roll
   torque (left wing pushed up)
 - positive _u[5] (configured as CA_SV_CS1) generates positive FW roll
   torque (right wing pushed down, note the additional minus)

So in the FW frame, they work like this:
 - positive _u[4] + _u[5] -> positive FW roll torque
 - positive _u[4] - _u[5] -> positive FW pitch torque

The airframe file however configures all of these in the multicopter
frame. So accounting for the frame conversion, we have:
 - MC yaw = -FW roll = -_u[4] - _u[5]
     - because FW x points nose-forward while MC z points nose-backward
 - MC pitch = FW pitch = _u[4] - _u[5]

or in matrix form:

[  MC yaw  ]   [ -1  -1 ] [ _u[4] ]
[ MC pitch ] = [ 1   -1 ] [ _u[5] ]

and as this matrix is basically (up to scaling)

[ CS0_TRQ_Y CS1_TRQ_Y ]
[ CS0_TRQ_P CS1_TRQ_P ]

we have to change the CS1_TRQ_* coefficients to be negative.
2026-07-01 15:51:28 +02:00
Alireza Ghaderi b885c2d7e9 feat(sim): add X-Plane SITL airframes (#22493) 2026-07-01 18:42:33 +10:00
f937bd5818 refactor(failure_injection): centralize MAV_CMD_INJECT_FAILURE behind a manager module (#27572)
* feat(failure_injection): add failure_injection topic and helper library

* feat(failure_injection): add failure injection manager module

* refactor(commander): route motor failure injection through the manager

* refactor(simulation): route sensor sim failure injection through the manager

* refactor(simulation): route SimulatorMavlink failure injection through the manager

* feat(failure_injection): start the manager in the SITL startup

* docs(failure_injection): document per-simulator failure support

* feat(failure_injection): enhance failure injection management and configuration

* fix(rebase): baro failure injectionb

* refactor(failure_injection): simplify FailureInjectionManager and FailureTable implementations

* refactor(failure_injection): replace Subscriber with Config in various modules and add update method

* update(uorb): FailureInjection.msg to docs standard

* docs(docs): subedit

* fix(failure_injection): correct comment formatting in FailureInjection.msg

* feat(failure_injection): add failure injection manager support across multiple boards and modules

* feat(mavlink): implement failure injection functionality

---------

Co-authored-by: Claudio Chies <chiesc@chies.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-06-30 15:33:39 +02:00
Hyunduk Shin 2bc9774170 feat(airframes): add generic airship 2026-06-29 12:34:55 -07:00
6ddf60c7b4 feat(sim): add RotorPy simulator support (#27116)
* Add rotorpy simulator and integrate with main simulator script

* docs: add rotorpy simulator instructions

* docs(update): subedit

* docs: address RotorPy review comments

---------

Co-authored-by: Davide Iafrate <dvde.iafrate98@gmail.com>
Co-authored-by: Ramon Roche <mrpollo@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-06-25 15:51:55 -07:00
Matthias Grob c05cc47b75 fix(mc_defaults): remove 2m instead of 10m acceptance radius (#27738)
This setting comes from a time where takeoff was accepted immediately if the acceptance radius was too big and also the mission behavior was completely different:

95a8414895
2026-06-24 10:06:26 -06:00
Gennaro Guidone 143b518528 fix(rcS): FMU output pins not working when serial passthrough is not compiled for a board (#27682)
#27605 gated the dshot/pwm_out start on `param compare -s PASSTHRU_EN 0`.
PASSTHRU_EN is registered only when the serialpassthrough driver is
compiled in, which is not the case on most boards (e.g. fmu-v5x). There
param_find() fails, `param compare` returns "no match", the else branch
runs, and the FMU outputs never start: the PWM_AUX group disappears from
the Actuators screen and motors wired to those pins won't arm. SITL uses a
separate init.d-posix rcS and is unaffected, so CI did not catch it.

Use the start-unless-explicitly-enabled idiom already used elsewhere in
rcS (`param greater -s`): only skip the outputs when PASSTHRU_EN is
explicitly > 0. A missing or zero parameter starts the outputs as before.
2026-06-17 16:37:50 +02:00
Jacob Dahl a5b2270292 fix(parameters): save resets synchronously and scope caldata repair (#27658)
* fix(commander): save parameters synchronously after parameter reset

ParamResetAll and ParamResetAllConfig relied on the deferred autosave (300 ms delay, 2 s rate limit) to persist the reset, so a reboot or power cycle right after the command ack could leave the old parameters in storage. Save synchronously like ParamResetSensorFactory already does.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(rcS): only run caldata BSON size repair on boards with caldata

The bsondump docsize block from #23088 repairs a zeroed BSON document size field in /fs/mtd_caldata, but it ran unconditionally with a comment claiming it checks /fs/mtd_params, producing failed-bsondump boot noise on every board without a caldata partition. Move it inside the MTD_CALDATA gate next to the param load it exists to protect.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-06-14 16:24:09 -06:00
Jacob Dahl 940af26b4b fix(sensors): disable SENS_MAG_AUTOCAL by default, keep for CAN nodes (#27659)
PR #18421 added the initial mag calibration save and was deliberately merged with SENS_MAG_AUTOCAL=0 until parameter system concerns were addressed. PR #19818 (CAN GPS nodes) flipped the global default to 1 as an undiscussed side change, shipped in v1.14.0. Since then every uncalibrated mag marks itself calibrated (CAL_MAGn_ID set) shortly after the disarmed bias estimator stabilizes, so ground stations stop prompting for compass calibration on new setups, and the first flight happens on a hard-iron-only estimate with an assumed mount rotation.

Restore the disabled default and enable it where it is genuinely needed: CAN nodes, which have no GCS calibration flow and no EKF for in-flight refinement. MBE_ENABLE is untouched, the bias estimator still runs and corrects everywhere.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-06-12 19:17:53 -06:00
Phil-Engljaehringer f2eecc33f7 feat(drivers): implemented serial passthrough (#27605)
* feat: implemented serial passthrough

* fix: used make format

* fix: changed function order to match other drivers

* fix: moved passthrough from systemcmds to drivers

* fix: renamed BITBANG_TIMER to UART_BITBANG_TIMER

* fix: used make format

* feat: added PASSTHRU_EN guard to start of dshot&pwm_out

* fix: made changing ESC channels more stable

* fix: adjusted naming of guards

* fix: changed include guard of bitbang

* fix: removed unused variable SER_PASS_BAUD

* fix: adjusted comments

* fix: adjusted print_usage() to match other drivers

* fix: remove bitbang_write_byte from public API and some buffer guard

* fix: added Serialpassthrough&Bitbang to exclude list of allyesconfig.py

* fix: added missing flag to print_usage()
2026-06-12 18:27:26 +02:00
Jacob Dahl 88951f01e9 fix(parameters): self-initialize blank parameter storage at boot (#27623)
Flashing PX4 over another firmware (e.g. ArduPilot on an ARK FPV) or
first-booting a board with blank parameter storage played the error tune
on every boot: the param layer treated a blank store as corruption, and
the rcS recovery persisted with a file cp that is a no-op on
FLASH_BASED_PARAMS boards, so the store never became valid.

- param_import()/param_load() return 1 ("not yet stored") for a blank
  source - empty file, zeroed FRAM, or erased flash - on both the file
  and flash backends; a store that holds data but no valid entry (torn
  write, bit-rot, foreign data) is still reported as corrupt (-EILSEQ).
  The file backend detects a zero-length file via fstat (NuttX FAT
  cannot read() a 0-byte file: no cluster chain returns an error, not
  EOF) and otherwise inspects the leading BSON document length; the
  flash backend scans the whole store
- new 'param load-or-init <backup>' command: loads from the default
  storage; a blank store is seeded from the SD backup (or firmware
  defaults) and persisted so the next boot loads normally. A corrupt
  store, a backup that exists but cannot be opened or imported, or a
  result that cannot be persisted returns failure. The three-way
  loaded/blank/corrupt logic lives in C because nsh $? is a binary
  success flag. A failed backup seed does not reset to defaults, which
  preserves parameters loaded earlier in boot (e.g. factory calibration
  from /fs/mtd_caldata)
- rcS uses 'param load-or-init' instead of 'param import', and the
  corrupt-store recovery persists via 'param save' (works on
  flash-backed boards) only when the backup actually imported, so a
  corrupt backup keeps alerting the operator on the next boot
- commander ParamLoadDefault treats blank storage (1) as success and
  warns the GCS that parameters were reset to defaults, instead of
  reporting "Error loading settings"
- parameter_flashfs_init() in flashfs.c no longer reports a successful
  erase byte count as a failure (parity with flashfs32.c)

Tested with new blankImport and corruptImport cases in 'tests
parameters' (empty/zeroed/erased sources import as "not yet stored",
garbage fails to import); the CustomDefaults test now restores the
firmware default so the suite is repeatable within one boot.

The STM32H7 flash-erase DCACHE invalidate fix this depends on
(PX4/NuttX#381) is already in main's NuttX submodule.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-06-12 14:06:10 +12:00
mtandJacob Dahl 9b25e6df33 fix(simulation): preserve gravity and step_size in px4-rc.gzsim set_physics (#27488)
Build all targets / Scan for Board Targets (push) Has been cancelled
Build all targets / Seed [${{ matrix.chip_family }}] (push) Has been cancelled
Build all targets / Build [${{ matrix.runner }}][${{ matrix.group }}] (push) Has been cancelled
Build all targets / Upload Artifacts (push) Has been cancelled
Checks / Gate Checks [check_format] (push) Has been cancelled
Checks / Gate Checks [check_newlines] (push) Has been cancelled
Checks / Gate Checks [module_documentation] (push) Has been cancelled
Checks / Gate Checks [shellcheck_all] (push) Has been cancelled
Checks / Gate Checks [validate_module_configs] (push) Has been cancelled
Checks / Unit Tests (push) Has been cancelled
MacOS build / build (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:22.04) (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:24.04) (push) Has been cancelled
Container build / Set Tags and Variables (push) Has been cancelled
Container build / Build Container (amd64) (push) Has been cancelled
Container build / Build Container (arm64) (push) Has been cancelled
Container build / Deploy To Registry (push) Has been cancelled
Docs - Orchestrator / T1: Detect Changes (push) Has been cancelled
Docs - Orchestrator / T2: PR Metadata (push) Has been cancelled
Docs - Orchestrator / T2: Metadata Sync (push) Has been cancelled
Docs - Orchestrator / T2: Link Check (push) Has been cancelled
Docs - Orchestrator / T3: Build Site (push) Has been cancelled
Docs - Orchestrator / T4: Deploy (push) Has been cancelled
Failsafe Simulator Build / build (failsafe_web) (push) Has been cancelled
ITCM check / Checking nxp_mr-tropic (push) Has been cancelled
ITCM check / Checking nxp_tropic-community (push) Has been cancelled
ITCM check / Checking px4_fmu-v5x (push) Has been cancelled
ITCM check / Checking px4_fmu-v6xrt (push) Has been cancelled
ROS Integration Tests / build (push) Has been cancelled
ROS Translation Node Tests / Build and test [humble] (push) Has been cancelled
ROS Translation Node Tests / Build and test [jazzy] (push) Has been cancelled
SITL Tests / Testing PX4 iris (push) Has been cancelled
Docs - Crowdin - Upload Guide sources (en) / upload-to-crowdin (push) Has been cancelled
FLASH usage analysis / Analyzing px4_fmu-v5x (push) Has been cancelled
FLASH usage analysis / Analyzing px4_fmu-v6x (push) Has been cancelled
Python CI Checks / build (push) Has been cancelled
Sync ROS 2 messages to px4_msgs / sync_to_px4_msgs (push) Has been cancelled
FLASH usage analysis / Publish Results (push) Has been cancelled
Static Analysis / Clang-Tidy (push) Has been cancelled
* fix(simulation): preserve gravity and step_size in px4-rc.gzsim set_physics

The set_physics service call in px4-rc.gzsim sent only real_time_factor.
Other fields in gz.msgs.Physics (gravity, max_step_size) defaulted to 0
per protobuf semantics, silently zeroing world gravity in the gz physics
engine when PX4_SIM_SPEED_FACTOR was set. Vehicles became weightless
while PX4's accelerometer (sourced from the gz IMU plugin's cached SDF
gravity) continued to report -9.81 m/s², making the bug invisible from
PX4's side.

Resolve the values via the live gz physics topic, fall back to the
world SDF, and finally to Earth gravity / gz-harmonic default step
size, then include the full set in the set_physics request.

Fixes #27480

Signed-off-by: Marko T <marko.tavcar@c-astral.com>

* fix(simulation): resolve world name in standalone and drop dead physics topic

The gz physics topic queried for gravity/max_step_size does not exist in
gz Harmonic (only a write-only set_physics service), so that branch always
timed out and fell through. Read both values directly from the world SDF,
which is the source of truth at load time.

Also resolve PX4_GZ_WORLD from the running gz instance (clock topic) inside
the readiness check, so standalone launches — where the world name is not
known up front — can find the scene and the world SDF.

Signed-off-by: Marko T <marko.tavcar@c-astral.com>

* Update ROMFS/px4fmu_common/init.d-posix/px4-rc.gzsim

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

* Update ROMFS/px4fmu_common/init.d-posix/px4-rc.gzsim

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

* docs(simulation): clarify gravity-default fallback comment in px4-rc.gzsim

Fix typo ("greavity") and reword the comment to clearly state that the
hardcoded gravity/step-size defaults are only used when the world SDF
cannot be located, and are wrong for custom-gravity worlds.

Signed-off-by: Marko T <marko.tavcar@c-astral.com>

---------

Signed-off-by: Marko T <marko.tavcar@c-astral.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2026-06-08 20:50:07 -06:00
Jonas Peroliniandjonas dd604072c4 feat(new_module): Static and moving vision-based target esitmator (Kalman Filter) (#23726)
Co-authored-by: jonas <jonas.perolini@rigi.tech>
2026-05-26 07:27:49 +10:00
65be196b9b docs(rovers): add hiwonder rover airframes and setup guide (#27333)
* rover: add hiwonder rover airframes

* docs: hiwonder rovers setup guide

* docs(docs): compress images

* docs(docs): prettier

* docs(docs): subedit

* docs(rover): add back tip about custom firmware install

* docs(rover): detail the hiwonder build / enable instructions

* docs(rover): fix airframe typo for ackermann

* docs(docs): Improve firmware section

---------

Co-authored-by: chfriedrich98 <chfriedrich@student.ethz.ch>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Ramon Roche <mrpollo@gmail.com>
2026-05-21 15:51:52 -04:00
Peter van der Perk f16a2487ac fix(rcS): Use CONFIG_BOARD_ROOT_PATH as root path. (#27378)
Instead of hardcoded /fs/microsd use the BOARD_ROOT_PATH Kconfig
variable
2026-05-18 09:33:45 -06:00
Phil-Engljaehringer aa7c66e0a7 feat(uavcan): flash firmware onto CAN nodes from SD card (#27043)
Place firmware .bin files at the SD card root or staging directory
(/fs/microsd/ufw_staging/); on boot the UAVCAN server migrates them
to /fs/microsd/ufw/ and updates FW.db, then flashes any connected
node whose firmware version mismatches.

- Add firmware migration from SD root and staging dir into /fs/microsd/ufw/
- Maintain FW.db flat-file database mapping board IDs to original filenames
- Use cache-aligned DMA-safe read/write buffers (required on STM32H7)
- Add Tools/auterion/remote_update_fmu.sh for SSH-based FMU+canio updates
2026-05-18 16:19:25 +02:00
Michael Fritscheandchfriedrich98 0932ad144b feat(drivers): add support for hiwonder 4 channel encoder motor module (#27229)
* driver: hiwonder encoder motor module

* fix(drivers): Change HiwonderEMM from CRTP API to non-template ModuleBase

* fix(drivers): exclude hiwonder_emm driver from sitl build, as it fails i2c dependencies

* feat(drivers, hiwonder4channel): add parameter update subsciption

* feat(drivers, hiwonder4channel): add requested changes of original PR

* fix(drivers, hiwonder4channel): add default in hiwonder_emm module.yaml

* fix(drivers, hiwonder4channel): formatting

* fix(drivers, hiwonder4channel): add the hiwonder driver to all px4board s that include the roboclaw driver

* cleanup(drivers, hiwonder4channel): update copyright year

* chore(drivers): move hiwonder driver startup call from rc.board_sensors to rc.rover

* chore(drivers): hiwonder 4 channel - improve HIWONDER_EMM_EN description

* chore(drivers): hiwonder4channel - move to int8 for internal speed values

* chore(drivers): hiwonder4channel - move unconfigurable value to initialization.

* chore(drivers): hiwonder4channel - add reboot_required to enable parameter

* chore(drivers): hiwonder4channel - add docs

---------

Co-authored-by: chfriedrich98 <chfriedrich@student.ethz.ch>
2026-05-13 15:09:39 +02:00
Salaheldin HassanandHamish Willee a5549b5c75 feat(simulation): Bind Mavlink to specific interface via PX4_NET_INTERFACE (#26385)
* SITL: mavlink bind to a specific interface using an environment variable PX4_NET_INTERFACE
Fixes issue #26384

* document the usage of PX4_NET_INTERFACE

* Improved Docs:
- Added new Environment Configuration subsection at the end of SITL Simulation
- Removed the old Bind MAVLink to Specific Network Interface subsection (content consolidated into the new section)

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-05-10 15:19:31 +01:00
Matthias Grob 5e86be131c fix(commander): Remove COM_OBC_LOSS_T (#27261)
hardcoding the default 5 second timeout.
2026-04-30 23:40:44 +02:00
76ce06c931 feat(sih): Add thrust model for hexacopter simulation (#26587)
* Quadratic thrust for SIH hexarotor (#67)

* sih: add thrust model hexacopter model

* fix: add missing line break

* sihsim_hey airframe: add THR_MDL_FAC

to accomodate for simulated quadratic motor thrust.

* fix(sih):  fix quadratic model in simulation

The square was done in place and the low pass filter also effected the same variable, the result was that for small numbers the low pass filter gain was not enouhg with respect to the decay caused by squaring numbers close to zero. As a result even if you where trying to send 1 xcommands in simulation it would stoip around 0.008. Now the square is done in a different variable, the problem is not there anymore.

Tested in simulation
---------

Signed-off-by: Gennaro Guidone <gennaroguido2002@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
Co-authored-by: Gennaro Guidone <gennaroguido2002@gmail.com>
2026-04-29 09:18:05 -06:00
Julian Oes b48ec2dd68 feat(params): add board-level read-only parameter support (#26522)
Integrators can declare read-only parameters in a per-board YAML file:
readonly_params.yaml.

There are two ways to define the read-only params:
- "block": default writable, explicitly list params to be locked
- "allow": default readonly, explicitly list params to be writable

Enforcement is activated by `param lock` in rcS after all startup
scripts have run, so board defaults and airframe scripts can still set
params during init.

The feedback via MAVLink uses the new
MAV_PARAM_ERROR_READ_ONLY as part of the PARAM_ERROR message.
2026-04-27 09:06:43 +12:00
Balduin 3008a496b4 fix(airframes/10043): Fix pusher being too weak
The airframe 10043 (make px4_sitl sihsim_standard_vtol) currently does
not have enough forward thrust to reach VT_ARSP_TRANS (10) or
VT_ARSP_BLEND (8), so we get front transition timeout.

By bisecting, we find that #26720 breaks it. The PR introduces a new
dynamic prop model, which is now used in the airframes 1101, 1102, 1103,
and 1105 (new addition), but not 10043.

The PR also removes a previous magic number that gave the standard VTOL
pusher twice the max thrust of the hover motors (2 * 2N = 4N). It
introduces a separate SIH_F_T_MAX, but by default it is 2N, causing the
weak pusher for 10043.

Fix by using the new dynamic propeller model by default, with the same
params that #26720 introduces for airframe 1103 (It would also suffice
to only set SIH_F_T_MAX=6, but now that we have the nicer model let's
use it).

Note that 10041 (sihsim_airplane) is not broken by #26720 in this way,
as it already has SIH_T_MAX of 6N.
2026-04-14 14:33:31 +02:00
BalduinandJacob Dahl c970a822a0 refactor(battery_simulator): clean up param SIM_BAT_ENABLE (#26823)
* refactor(battery_simulator): remove SIM_BAT_ENABLE

disable instead with SIM_BAT_DRAIN <= 0

* fix(battery_simulator): disable battery sim only if SIM_BAT_DRAIN strictly < 0

* fix(battery_simulator): disable if 0, adjust limit to 0

* fix(battery_simulator): remove constraining again

now that SIM_BAT_DRAIN=0 means the module is not started we are safe
from division by zero again (param compare has a tolerance of 1e-7)

* fix(battery_simulator): constrain param to min of 1

to avoid division by zero.

This reverts commit 6380c4fdee.

* fix(battery_simulator): remove arbitrary param max

* fix(battery_simulator): reword long param description

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

* fix(battery_simulator): reword short param description

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

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2026-04-12 16:20:46 -08:00
alexcekay 20cad48707 rcS: fine-grained storage settings 2026-04-09 11:22:43 +02:00
Ramon Rocheandromain-chiap 3c5574c051 feat(sih): add propeller model with advance ratio (#26720)
---------

Signed-off-by: romain-chiap <romain.chiap@gmail.com>
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Co-authored-by: romain-chiap <romain.chiap@gmail.com>
2026-04-08 15:57:17 -07:00
Ramon Roche 01dd41b7e8 fix(sim/sih): fix MAV_TYPE to report hexarotor in heartbeat
rc.mc_defaults sets MAV_TYPE=2 (quadrotor) which the hex airframe
never overrides. Set MAV_TYPE=13 (hexarotor) so the heartbeat
correctly identifies the vehicle type.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-31 17:01:10 -06:00
Nick 1856933bac fix(rcS): silence VTX_SER_CFG on boot (#26914) 2026-03-31 10:11:36 -08:00
ttechnick e4fe5bbad5 chore(drivers): only start vtxtable when required 2026-03-18 13:36:44 +01:00
Silvan bb02ed9782 feat(rcS): do not exclude RC_* params from a reset
There are many settings falling into the RC_* category
that definitely should be reset when e.g. placing the autopilot
into a new airframe.
And even for RC calibration values: it's not the worst
if those are newly calibrated after a reset. Or if they
are not expected to change one can bake them into the
airframe file.

Signed-off-by: Silvan <silvan@auterion.com>
2026-03-18 11:38:32 +01:00
Nick 5b1a0e7236 feat(drivers): silence TMP102 driver startup (#26776) 2026-03-17 21:15:30 -08:00
Jacob Dahl 4b2e0a6f59 feat(sensors/gps): add per-receiver GPS delay parameters (#26660)
* sensors: add per-receiver GPS delay parameters

Add SENS_GPS{0,1}_DELAY params to vehicle_gps_position, following the
same device-ID matching pattern used for antenna offsets. Each receiver
can now have its own measurement delay relative to the IMU.

The delay is applied to timestamp_sample before blending. When PPS time
correction is active it takes priority over the parameter-based delay.
When a GPS driver already provides its own timestamp_sample the
per-receiver delay is not applied on top of it.

* fix(ekf2): remove EKF2_GPS_DELAY and perform param transation

* fix(param_translation): fix GPS param migration return values

Add missing return for EKF2_GPS_POS_Z and remove incorrect return for
EKF2_GPS_DELAY (1-to-many migration should not return PARAM_MODIFIED).

* fix(sensors,ekf2): rename pps_compensation and clarify delay default

* fix(ekf2): account for SENS_GPS*_DELAY in observation buffer sizing

* fix(docs): migrate EKF2_GPS_DELAY param
2026-03-17 18:19:08 -08:00
Jacob Dahl 89855926ef feat(sensors/gps): move GPS antenna offsets to per-receiver parameters (#26634)
* sensors: move GPS antenna offsets to per-receiver parameters

Move antenna position configuration from the single EKF2_GPS_POS_X/Y/Z
parameter set into per-receiver SENS_GPS{0,1}_OFF{X,Y,Z} parameters in
the sensors module. Each offset slot is matched to a physical receiver
by device ID (SENS_GPS{0,1}_ID), falling back to uORB instance index
when no IDs are configured.

The antenna offset is now carried through the SensorGps uORB message
and blended alongside other GPS states when multi-receiver blending is
active, so EKF2 receives the correct lever arm for whichever receiver
(or weighted combination) is selected.

- Add antenna_offset_{x,y,z} fields to SensorGps.msg
- Remove EKF2_GPS_POS_X/Y/Z params; EKF2 reads offset from gnssSample
- Add SENS_GPS{0,1}_ID and SENS_GPS{0,1}_OFF{X,Y,Z} params (module.yaml)
- Blend antenna offsets in GpsBlending (weighted average)
- Add unit tests for single, blended, and failover antenna offset cases
- Migrate params.c to module.yaml for the vehicle_gps_position module

* sensors: gps_blending: add asymmetric weight and fallthrough offset tests

Add two additional antenna offset test cases:

- dualReceiverAsymmetricWeightAntennaOffset: verify that unequal eph
  values produce correctly skewed blend weights (0.8/0.2) and that the
  output antenna offset reflects the weighted average
- blendingFallthroughAntennaOffset: verify that when blending is enabled
  but can_do_blending evaluates false (eph=0), the non-blending path
  correctly assigns the selected receiver's antenna offset

* feat(param_translation): translate EKF2_GPS_POS_ to SENS_GPS0_OFF_

* fix(msgs): proper formatting

* chore(msg): 0 if invalid/unknown

* fix(ROMFS): migrate EKF2_GPS_POS_ params

* fix(docs): migrate EKF2_GPS_POS_ params

* fix(blending): unsigned param

* Update msg/SensorGps.msg

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(sensors/gps): remove 'values:' tag in  module.yaml

* fix(sensors/gps): unsigned instance index

* fix(blending): restore const on gps_blend_states()

Move antenna offset blending into blend_gps_data() where the
weights are computed, keeping gps_blend_states() const.

* fix(sensors/gps): fix msg annotation and restore SENS_GPS_PRIME values

Remove incorrect @invalid NaN annotation from antenna offset fields
(0.0 default is correct, not a sentinel). Restore values tag for
SENS_GPS_PRIME so QGC shows a dropdown.

* fix(gps_blending): fix pre-existing bug to clear _gps_updated flags

The loop iterates over i but always clears gps_select_index. The intent is to clear
all updated flags, but only the selected one gets cleared (N times)

* test(gps_blending): add stale update flag regression test
2026-03-17 17:33:41 -08:00
Matthias Grob efdd1e021f fix(rcS): reset the flight mode assignments during an airframe reset (#26773)
* fix(rcS): reset the flight mode assignments during an airframe reset

because there are many products that have a default flight mode assignment in the airframe file and if the user resets to airframe defaults the flight mode assignment stays custom and doesn't get reset to "factory settings". It's neither a unit specific calibration nor a parameter to track total flights or flight time. I suggest to reset it as well.

* fix(posix rcS): sync airframe reset with the px4 common startup script

to make simulation testing of an airframe reset more realistic.
2026-03-17 12:43:27 -08:00
Matthias Grob 270ad06e5f Remove traces of FD_ESCS_EN 2026-03-12 18:30:51 +01:00
Hamish Willee 9e41ffd537 docs:Fix in-source broken links in modules and airframes ref (#26611) 2026-03-02 18:18:00 +11:00
TimandPedro Roque 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
Victor Nan Fernandez-Ayala 2a0b795760 fix: set UXRCE_DDS_AG_IP in UUV airframe, remove from defaults (#26485) 2026-02-17 16:15:45 -08:00
Jacob Dahl d84903d520 init.d-posix/airframes/4004_gz_standard_vtol: param set-default VT_PITCH_MIN -5 (#26507) 2026-02-17 00:06:29 -09:00
Daniel Honies ac4f419b50 Update 4004_gz_standard_vtol
VT_F_TRANS_THR at 0.3 always triggers front transition timeout as the vehicle does not accaelerate quickly enough. With the param set to 1.0 it works.
2026-01-29 18:07:32 +01:00
Matthias Grob cac3c3c133 boot script: start uavcan and zenoh before logger
Build all targets / Scan for Board Targets (push) Has been cancelled
Build all targets / Build [${{ matrix.runner }}][${{ matrix.group }}] (push) Has been cancelled
Build all targets / Upload Artifacts (push) Has been cancelled
Checks / build (NO_NINJA_BUILD=1 px4_fmu-v5_default) (push) Has been cancelled
Checks / build (NO_NINJA_BUILD=1 px4_sitl_default) (push) Has been cancelled
Checks / build (check_format) (push) Has been cancelled
Checks / build (check_newlines) (push) Has been cancelled
Checks / build (module_documentation) (push) Has been cancelled
Checks / build (px4_fmu-v2_default stack_check) (push) Has been cancelled
Checks / build (px4_sitl_allyes) (push) Has been cancelled
Checks / build (shellcheck_all) (push) Has been cancelled
Checks / build (tests) (push) Has been cancelled
Checks / build (tests_coverage) (push) Has been cancelled
Checks / build (validate_module_configs) (push) Has been cancelled
Clang Tidy / build (push) Has been cancelled
MacOS build / build (px4_fmu-v5_default) (push) Has been cancelled
MacOS build / build (px4_sitl) (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:22.04) (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:24.04) (push) Has been cancelled
Container build / Set Tags and Variables (push) Has been cancelled
Container build / Build Container (amd64) (push) Has been cancelled
Container build / Build Container (arm64) (push) Has been cancelled
Container build / Deploy To Registry (push) Has been cancelled
EKF Update Change Indicator / unit_tests (push) Has been cancelled
Failsafe Simulator Build / build (failsafe_web) (push) Has been cancelled
FLASH usage analysis / Analyzing px4_fmu-v5x (push) Has been cancelled
FLASH usage analysis / Analyzing px4_fmu-v6x (push) Has been cancelled
FLASH usage analysis / Publish Results (push) Has been cancelled
ITCM check / Checking nxp_mr-tropic (push) Has been cancelled
ITCM check / Checking nxp_tropic-community (push) Has been cancelled
ITCM check / Checking px4_fmu-v5x (push) Has been cancelled
ITCM check / Checking px4_fmu-v6xrt (push) Has been cancelled
MAVROS Mission Tests / build (map[mission:MC_mission_box vehicle:iris]) (push) Has been cancelled
MAVROS Offboard Tests / build (map[test_file:mavros_posix_tests_offboard_posctl.test vehicle:iris]) (push) Has been cancelled
Nuttx Target with extra env config / build (px4_fmu-v5_default) (push) Has been cancelled
Python CI Checks / build (push) Has been cancelled
ROS Integration Tests / build (push) Has been cancelled
ROS Translation Node Tests / Build and test (map[ros_version:humble ubuntu:jammy]) (push) Has been cancelled
ROS Translation Node Tests / Build and test (map[ros_version:jazzy ubuntu:noble]) (push) Has been cancelled
SITL Tests / Testing PX4 tailsitter (push) Has been cancelled
SITL Tests / Testing PX4 iris (push) Has been cancelled
SITL Tests / Testing PX4 standard_vtol (push) Has been cancelled
because they publish optional topics which need to be advertised before logger starts otherwise they do not get logged!
2026-01-27 10:06:22 +01:00
Niklas Hauser c0c265cd1f [vtx] Add VTX driver with Tramp and SmartAudio support
Build all targets / Scan for Board Targets (push) Has been cancelled
Build all targets / Build [${{ matrix.runner }}][${{ matrix.group }}] (push) Has been cancelled
Build all targets / Upload Artifacts (push) Has been cancelled
Checks / build (NO_NINJA_BUILD=1 px4_fmu-v5_default) (push) Has been cancelled
Checks / build (NO_NINJA_BUILD=1 px4_sitl_default) (push) Has been cancelled
Checks / build (check_format) (push) Has been cancelled
Checks / build (check_newlines) (push) Has been cancelled
Checks / build (module_documentation) (push) Has been cancelled
Checks / build (px4_fmu-v2_default stack_check) (push) Has been cancelled
Checks / build (px4_sitl_allyes) (push) Has been cancelled
Checks / build (shellcheck_all) (push) Has been cancelled
Checks / build (tests) (push) Has been cancelled
Checks / build (tests_coverage) (push) Has been cancelled
Checks / build (validate_module_configs) (push) Has been cancelled
Clang Tidy / build (push) Has been cancelled
MacOS build / build (px4_fmu-v5_default) (push) Has been cancelled
MacOS build / build (px4_sitl) (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:22.04) (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:24.04) (push) Has been cancelled
Container build / Set Tags and Variables (push) Has been cancelled
Container build / Build Container (amd64) (push) Has been cancelled
Container build / Build Container (arm64) (push) Has been cancelled
Container build / Deploy To Registry (push) Has been cancelled
EKF Update Change Indicator / unit_tests (push) Has been cancelled
Failsafe Simulator Build / build (failsafe_web) (push) Has been cancelled
FLASH usage analysis / Analyzing px4_fmu-v5x (push) Has been cancelled
FLASH usage analysis / Analyzing px4_fmu-v6x (push) Has been cancelled
FLASH usage analysis / Publish Results (push) Has been cancelled
ITCM check / Checking nxp_mr-tropic (push) Has been cancelled
ITCM check / Checking nxp_tropic-community (push) Has been cancelled
ITCM check / Checking px4_fmu-v5x (push) Has been cancelled
ITCM check / Checking px4_fmu-v6xrt (push) Has been cancelled
MAVROS Mission Tests / build (map[mission:MC_mission_box vehicle:iris]) (push) Has been cancelled
MAVROS Offboard Tests / build (map[test_file:mavros_posix_tests_offboard_posctl.test vehicle:iris]) (push) Has been cancelled
Nuttx Target with extra env config / build (px4_fmu-v5_default) (push) Has been cancelled
Python CI Checks / build (push) Has been cancelled
ROS Integration Tests / build (push) Has been cancelled
ROS Translation Node Tests / Build and test (map[ros_version:humble ubuntu:jammy]) (push) Has been cancelled
ROS Translation Node Tests / Build and test (map[ros_version:jazzy ubuntu:noble]) (push) Has been cancelled
SITL Tests / Testing PX4 tailsitter (push) Has been cancelled
SITL Tests / Testing PX4 iris (push) Has been cancelled
SITL Tests / Testing PX4 standard_vtol (push) Has been cancelled
Sync ROS 2 messages to px4_msgs / sync_to_px4_msgs (push) Has been cancelled
Docs - Crowdin - Upload Guide sources (en) / upload-to-crowdin (push) Has been cancelled
Docs - Deploy PX4 User Guide to AWS / build (push) Has been cancelled
Docs - Deploy PX4 User Guide to AWS / deploy (push) Has been cancelled
2026-01-26 11:05:22 +01:00
Pernilla 8c5c4a0504 gimbal: update gz gimbal 2026-01-16 11:33:45 +01:00