48275 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
fe7bf8472b Add static_assert to verify LOG_FILEPATH_SCANF_WIDTH is synchronized
- Add compile-time check that LOG_FILEPATH_SIZE == 256
- Ensures LOG_FILEPATH_SCANF_WIDTH stays synchronized if buffer size changes
- Provides clear error message if someone modifies LOG_FILEPATH_SIZE

Co-authored-by: dakejahl <37091262+dakejahl@users.noreply.github.com>
2025-12-15 21:50:04 +00:00
copilot-swe-agent[bot]
ca336fb299 Use LOG_FILEPATH_SCANF_WIDTH macro for format specifier
- Define LOG_FILEPATH_SCANF_WIDTH macro for the sscanf width specifier
- Replace hardcoded '255' with the named macro in both sscanf calls
- Improves maintainability and makes the relationship between buffer size and width explicit
- Addresses final code review feedback about magic numbers

Co-authored-by: dakejahl <37091262+dakejahl@users.noreply.github.com>
2025-12-15 21:49:01 +00:00
copilot-swe-agent[bot]
5cdc783b05 Remove duplicate constant and use header LOG_FILEPATH_SIZE
- Remove duplicate LOG_FILEPATH_SIZE macro from cpp file
- Use MavlinkLogHandler::LOG_FILEPATH_SIZE consistently throughout
- Update local filepath buffer to use the same size as LogEntry.filepath
- Addresses code review feedback about duplication and consistency

Co-authored-by: dakejahl <37091262+dakejahl@users.noreply.github.com>
2025-12-15 21:47:25 +00:00
copilot-swe-agent[bot]
5037a96376 Define LOG_FILEPATH_SIZE constant for maintainability
- Add LOG_FILEPATH_SIZE constant (256) in both header and cpp
- Update LogEntry.filepath to use the constant
- Improve comments explaining width specifier relationship
- Addresses code review feedback about magic numbers

Co-authored-by: dakejahl <37091262+dakejahl@users.noreply.github.com>
2025-12-15 21:45:09 +00:00
copilot-swe-agent[bot]
8e0cabaeb7 Add static_assert and use consistent %255s width specifier
- Add static_assert to ensure PX4_MAX_FILEPATH >= 256 at compile time
- Use %255s consistently for both sscanf calls to prevent overflow
- Add explanatory comments for the width specifier choice
- Addresses code review feedback about potential overflow on NuttX

Co-authored-by: dakejahl <37091262+dakejahl@users.noreply.github.com>
2025-12-15 21:43:00 +00:00
copilot-swe-agent[bot]
338595edd1 Fix stack buffer overflow in mavlink_log_handler sscanf calls
- Increase LogEntry.filepath buffer from 60 to 256 bytes
- Add width specifiers to sscanf calls (%255s and %1023s) to prevent buffer overflow
- Prevents remote DoS vulnerability when parsing logdata.txt with excessively long filenames

Co-authored-by: dakejahl <37091262+dakejahl@users.noreply.github.com>
2025-12-15 21:37:29 +00:00
copilot-swe-agent[bot]
f219c9f3b9 Initial plan 2025-12-15 21:33:02 +00:00
Brandon W. Banks
1345b3500a
Vehicle command for Prearm Safety button (#26079)
* added vehicle command and support to remotely activate/deactivate the safety system (#26078)

* added print_status support for prearm safety status

* updated safety button to map to MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = '5300'

* safety switch cmd: fixed incorrect catch-all and added commanded_state variable for easier reading
2025-12-15 11:25:32 -09:00
Balduin
8604604a5b
logged_topics: clean up old commented-out topics (#26120) 2025-12-15 09:53:24 -09:00
bresch
d62f112017 ekf2: prevent false mag fault detection
A false positive could be triggered if velocity fusion started,
then stopped after takeoff and only position fusion started again
(because velocity fusion timed out and had a timestamp > time_last_on_ground).
We now also check if the fusion timeout is due to the innovation being
rejected (and not just a temporary check failure or data interruption).
2025-12-15 14:06:04 +01:00
Farhang
14186cf74f
[Tests] [CI] fix flaky altitude SITL test (#26106)
* test: increase altitude tolerance to fix flaky test

Altitude tolerance increased from 0.1f to 0.15f to handle simulation
timing variations. Test was failing at 0.201m with 0.2m tolerance.

* test: increase altitude tolerance further to 0.3m

* ci: re-add branch trigger for SITL tests

* Revert "ci: re-add branch trigger for SITL tests"

This reverts commit e5e4c9637b70a9d29247b82a52e11f1f2d0dcc59.
2025-12-13 09:13:23 -09:00
Julian Oes
5fe82aa485
[Sponsored by CubePilot] Try to fix potential mavlink segfaults on USB disconnect (#26083)
* mavlink: fix potential use-after-free

If a mavlink instance is force stopped, the main thread might be out of
scope and the receiver thread would be doing a use-after-free.

Instead the receiver thread needs to check its own _should_exit flag.

* mavlink: protect shared data by mutex in dtor

I'm not sure if this potentially fixes any of the segfaults we have seen
on stopping mavlink instances but it potentially could matter if the
mavlink_receiver thread is killed after a timeout and tries to send any
messages as a zombie.
2025-12-12 12:24:02 -09:00
Jacob Dahl
b92d21bd31
serial: add txSpaceAvailable function (#26069)
* serial: add txSpaceAvailable function

* serial: txSpaceAvailable and bytesAvailable fixups
2025-12-12 09:31:33 -09:00
Alex Klimaj
12745baf6c
Adds configurable I2C address for PCA9685 PWM driver (#26051)
* Adds configurable I2C address for PCA9685 PWM driver

Introduces a parameter to set the I2C address for the PCA9685 PWM output driver, enhancing flexibility for hardware variations. Updates documentation and board initialization scripts to support the new configuration and streamline device startup.

* Update src/drivers/pca9685_pwm_out/module.yaml

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

* Update src/drivers/pca9685_pwm_out/module.yaml

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2025-12-12 09:31:19 -09:00
Jacob Dahl
c25fcabcc6 esc_battery: fix current reporting 2025-12-12 11:17:24 -07:00
Jacob Dahl
67d62cb371 Revert "gps: fix RTCM injection to use inject-before-read pattern as before. Add RTCM parser to frame-align injection. Drain GpsInjectData uORB queue into RTCM parser buffer and then inject. Add GPS_UBX_PPK parameter to enable MSM7 output from the GPS module (rather than the default of MSM4) which is required for PPK workflows."
This reverts commit 0704580a30bb319fddc8c036675996a3e7202704.
2025-12-11 21:32:26 -09:00
Jacob Dahl
0704580a30 gps: fix RTCM injection to use inject-before-read pattern as before. Add RTCM parser to frame-align injection. Drain GpsInjectData uORB queue into RTCM parser buffer and then inject. Add GPS_UBX_PPK parameter to enable MSM7 output from the GPS module (rather than the default of MSM4) which is required for PPK workflows. 2025-12-11 20:10:22 -09:00
Farhang
38eaa8b1d3
Add UAVCAN interfaces numbers board default (#26066) 2025-12-11 08:43:07 -05:00
Hamish Willee
16eac303de
docs: Add a magnetometer recalibration section (#26081) 2025-12-11 12:19:57 +11:00
Ryan Johnston
aadb83a220
Enhance quick magnetometer calibration feature (#26073)
Added support for specifying an arbitrary initial heading in quick magnetometer calibration.
2025-12-11 11:42:13 +11:00
Hamish Willee
3a2ce0925d
Metadata update 20251210 (#26070) 2025-12-10 15:49:47 +11:00
Sindre Meyer Hegre
29ba83109c
Update neural_networks.md with Ubuntu version warning (#26029)
* Update neural_networks.md with Ubuntu version warning

Added warning about Ubuntu version requirement for PX4 firmware.

* Update docs/en/advanced/neural_networks.md

* Update docs/en/advanced/neural_networks.md

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2025-12-10 10:31:01 +11:00
Antonio Sanjurjo C
7919959f5a
Update standard_modes.md. Fix broken Mavlink link (#26059) 2025-12-10 10:22:39 +11:00
Beat Küng
703d66e605
ci: move px4_msgs sync from jenkins to github actions (#26061)
* ci: move px4_msgs sync from jenkins to github actions

I noticed it has not synced in a while, the last time was here:
49a0f6c52c

The difference to before is that now also the release branches will be
synced instead of only 'main'.

---------

Co-authored-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2025-12-09 18:16:18 +00:00
Alexander Lerach
73a8fc8fb0 boards: v6s, save flash by disabling serial_test 2025-12-09 17:15:39 +01:00
ff-lukas
9b106f71a0 fix: correct baro units in tempcal script 2025-12-09 11:01:06 +01:00
PX4 Build Bot
b06094c737
New Crowdin translations - zh-CN (#26057)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-12-09 08:41:34 +11:00
PX4 Build Bot
96e5862d88
New Crowdin translations - uk (#26056)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-12-09 08:41:26 +11:00
PX4 Build Bot
98d8090458
New Crowdin translations - ko (#26055)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-12-09 08:40:51 +11:00
Kyle Fitzpatrick
3ebb47d53f TemperatureCompensationModule: fix order of temp cal args 2025-12-05 08:49:23 -09:00
Matthias Grob
b0008e99ff generate_board_target_json: allow to specify individual targets or entire boards in filter 2025-12-05 08:47:11 -09:00
mahima-yoga
c962c6a2c1 docs: update airspeed scale docs to include accelerated learning when ASPD_SCALE_n=1 2025-12-05 16:26:11 +01:00
mahima-yoga
18477554e0 wind-estimator: learn airspeed scale faster at beginning of flight
Multiply TAS scale process noise by 100 during the first 5 minutes
when ASPD_SCALE_n = 1.0 (default), enabling faster convergence on first flights.
2025-12-05 16:26:11 +01:00
Mahima Yoga
bcd67b7bad
ekf: enable constant position fusion during engine warm-up (#26041)
In cold weather, fuel engines need to be warmed up. Currently, this is done by switching to stabilized mode and throttle up. The issue is that when not using GNSS data, the vehicle is not detected as "at rest" due to vibrations and cannot switch into auto/takeoff modes.

If EKF2_ENGINE_WRM is enabled, and if the vehicle is armed and landed, constant position fusion is enabled.
2025-12-05 15:08:37 +01:00
mahima-yoga
fcddea4410 v6s: remove rover to free up flash 2025-12-05 14:03:10 +01:00
mahima-yoga
ca83b8330d autotune: enable autotune in mission mode
When operating fully autonomously (i.e., without manual control or a guaranteed link to the ground station), tuning a vehicle can be difficult since the current autotune process requires either RC input or a GCS command. For these scenarios, it it useful to be able to start autotune inside a mission.
2025-12-05 14:03:10 +01:00
Farhang
a7de5d176f
Permission error gz build fix (#25921) 2025-12-04 07:52:02 -05:00
dependabot[bot]
3e1c499d5d
build(deps): bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /docs (#26026)
Bumps [mdast-util-to-hast](https://github.com/syntax-tree/mdast-util-to-hast) from 13.2.0 to 13.2.1.
- [Release notes](https://github.com/syntax-tree/mdast-util-to-hast/releases)
- [Commits](https://github.com/syntax-tree/mdast-util-to-hast/compare/13.2.0...13.2.1)

---
updated-dependencies:
- dependency-name: mdast-util-to-hast
  dependency-version: 13.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-04 14:32:19 +11:00
PX4 Build Bot
1d00e4e8aa
New Crowdin translations - uk (#26038)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-12-04 14:31:01 +11:00
PX4 Build Bot
f90b1b375c
New Crowdin translations - ko (#26037)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-12-04 14:30:49 +11:00
PX4 Build Bot
73e71feb47
New Crowdin translations - zh-CN (#26039)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-12-04 14:29:51 +11:00
Eric Katzfey
45f9fb45c1
Replace ModalAI PX4 Autonomy Developer Kit with Starling 2 and Starling 2 Max (#26035) 2025-12-04 14:13:05 +11:00
Hamish Willee
e3f05f1bbe
Metadata update 20251203 (#26031)
* Metadata update 20251203

* Deleted translated removed msg

* _sidebar update to current
2025-12-04 08:34:07 +11:00
tompsontan
c0e0d9a080
boards: add new board X-MAV AP-H743r1 (#25967)
Author: @TompsonTan
2025-12-03 15:03:22 -05:00
Beniamino Pozzan
87c05c9181
docs: clarify PX4 versions associated to latest UXRCE_DDS features (#26005)
* docs: clarify PX4 versions associated to latest UXRCE_DDS features

Signed-off-by: Beniamino Pozzan <b.pozzan@archangelautonomy.com>

* Update docs/en/middleware/uxrce_dds.md

---------

Signed-off-by: Beniamino Pozzan <b.pozzan@archangelautonomy.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2025-12-03 12:18:35 +11:00
PX4 Build Bot
c41aab6ddf
New Crowdin translations - zh-CN (#26017)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-12-03 10:07:49 +11:00
PX4 Build Bot
45cad9f85c
New Crowdin translations - uk (#26016)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-12-03 10:07:38 +11:00
PX4 Build Bot
00509d540d
New Crowdin translations - ko (#26015)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-12-03 10:07:32 +11:00
Jaeyoung Lim
789babae8e
Update gz submodule (#26025) 2025-12-01 14:31:22 -08:00
Julian Oes
1de6001163
mavsdk_tests: bump MAVSDK version to v3.11.2 (#26024)
This should hopefully fix the annoying segfaults on destruction that we
have been seeing.
2025-12-01 13:30:08 -08:00