Commit Graph
71593 Commits
Author SHA1 Message Date
Thomas Watson 6ff4c5fcff AP_NavEKF3: add missing state normalization to RngBcnFusion
All other fusion functions normalize the quaternion.
2026-04-07 10:56:31 +10:00
Peter Barker f965d4c7fa AP_Scripting: make mount-driver.lua angles-only
we can have the C++ code make the conversions, so let it
2026-04-07 10:44:42 +10:00
Peter Barker 13ab85a5af AP_Scripting: allow script-defined gimbals to specify target types
this allows a script which converts ArduPilot targets into a wire protocol to send to a gimbal to tell ArduPilot what sorts of targets the script/gimbal can understand.

For example, if the gimbal being controlled can understand a lat/lng/alt, the script can tell ArduPilot that with the new method call.
2026-04-07 10:44:42 +10:00
Peter Barker ecd3a4a950 AP_Mount: allow script-defined gimbals to specify target types
this allows a script which converts ArduPilot targets into a wire protocol to send to a gimbal to tell ArduPilot what sorts of targets the script/gimbal can understand.

For example, if the gimbal being controlled can understand a lat/lng/alt, the script can tell ArduPilot that with the new method call.
2026-04-07 10:44:42 +10:00
Bob Long a9f14a868e AP_Scripting: fill in mount in docs.lua 2026-04-07 10:44:42 +10:00
Iampete1 f15952abae AP_DroneCAN: add node status logging 2026-04-07 10:38:21 +10:00
Iampete1 41c5fce6ba AP_HAL_SITL: Periph: ensure time starts from zero to allow rebooting 2026-04-07 10:38:21 +10:00
Peter BarkerandClaude Sonnet 4.6 0a2e614ed0 Tools: check_branch_conventions: check submodule updates are isolated
Any commit that updates a submodule pointer must contain no other
changed paths — no other files, no other submodules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 10:36:08 +10:00
Peter Barker f25ca332ac AP_PiccoloCAN: limit to boards with >2MB of flash 2026-04-07 09:32:36 +09:00
Randy Mackay 5842f5616c AC_AttitudeControl: reduce INPUT_TC default
multicopters reduced from 0.15 to 0.1
planes reduced from 0.2 to 0.15
2026-04-07 09:18:00 +09:00
Oleksandr Ivashyna c4bf273d7c AP_HAL_ChibiOS: update hwdef.dat for Atlas-Control
- Add UART8 (SBUS/DSM port) to SERIAL_ORDER
- Add PE0/PE1 pin definitions for UART8 RX/TX
- Remove BIDIR from PWM AUX channels 1,3,5,7
2026-04-07 10:09:25 +10:00
Iampete1 06fc4ca0fd APM_Control: Pitch: rework _get_coordination_rate_offset function to make it easyier to understand. 2026-04-07 10:04:36 +10:00
Iampete1 5054fbcd22 AMP_Control: move to common get_airspeed method 2026-04-07 10:04:36 +10:00
Peter Barker 69242d279c SITL: correct response to Viewpro model query
field is 10 bytes according to data sheet
2026-04-07 08:45:08 +10:00
Peter BarkerandClaude Sonnet 4.6 2230255e90 Revert "SITL: Viewpro: pad QUERY_MODEL name to 10 bytes to avoid autotest failure"
The driver fix (cap wire-data lengths before using as buffer/loop
bounds) means the 10-byte fixed copy is replaced by a length-bounded
copy, so the CRC byte is no longer reachable.  The padding workaround
is no longer needed.

This reverts commit 5861babc0a7.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 08:45:08 +10:00
Peter BarkerandClaude Sonnet 4.6 3b64dd7d92 AP_Mount: validate wire-data lengths before using as buffer/loop bounds
Topotek gimbal_version_analyse: data_buf_len comes from char_to_hex(_msg_buff[5]),
which returns 255 for an invalid hex byte. Return early on that value to reject
the malformed packet; a valid length field is always a hex digit.

Viewpro QUERY_MODEL handler: cap the memcpy to MIN(buffer, data_bytes_received-1)
so a short response cannot cause stale bytes from a previous packet to appear in
_model_name.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 08:45:08 +10:00
Peter BarkerandClaude Sonnet 4.6 48dc503dd6 AP_Mount: remove static from model_name buffer in send_camera_information
The static qualifier on model_name in Siyi and Topotek was wrong: static locals
are shared across all class instances, so two gimbals of the same type would
write into the same buffer. The {} initialiser was also misleading — on a static
local it fires only once at program start, not on each call. Use a plain
stack-allocated buffer (matching Viewpro) so it is correctly zero-initialised
on every call and is instance-safe.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 08:45:08 +10:00
Peter BarkerandClaude Sonnet 4.6 482a6efe87 AP_Mount: use MAVLink field len defines and strncpy_noterm for camera_information strings
Replace hardcoded buffer sizes (32, 140) with MAVLINK_MSG_CAMERA_INFORMATION_FIELD_*_LEN
defines in Siyi, Viewpro, Topotek, and Xacti backends. Use strncpy_noterm (which omits
the null terminator only when the string fills the field, as MAVLink allows) in place of
strncpy for copies into vendor_name and model_name send buffers. Also cap the Topotek
gimbal_model_name_analyse strncpy to sizeof(_model_name)-1 to ensure null termination,
and document _model_name as always null-terminated in both Viewpro and Topotek headers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 08:45:08 +10:00
Peter Barker d45e298a1f AP_Mount: avoid buffer-overread sending Viewpro camera_information
we prepared a buffer on the stack of the correct length but didn't use it.

The mavlink bindings memcpy out of this buffer according to the spec-defined length, so a buffer of at least that length should be supplied
2026-04-07 08:45:08 +10:00
Peter BarkerandClaude Sonnet 4.6 8f0040fad2 AP_Mount: use char[] rather than uint8_t[] for gimbal model name
The _model_name member in Viewpro and Topotek drivers holds a
null-terminated ASCII string, so char[] is the correct type.
Using uint8_t[] required pervasive (char*) and (const char*) casts
at every point of use. Switch to char[] and remove the now-redundant
casts, adding (const uint8_t*) only where the MAVLink API requires it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 08:45:08 +10:00
Peter BarkerandClaude Sonnet 4.6 be466868cf AP_Mount: Viewpro: replace strncpy with memcpy to fix -Wstringop-truncation
Making _msg_buff_data_start static constexpr allowed the compiler to
constant-fold the source pointer in the strncpy call, exposing a
-Wstringop-truncation warning: the source buffer extends 62 bytes but
only 10 are copied. The truncation is intentional (bounding to the
destination size), so replace with memcpy + explicit null terminator
to make the intent clear and silence the warning.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 08:45:08 +10:00
Peter Barker 3ee3f14921 AP_Mount: use 'static constexpr' in place of 'static const'
saves bytes.  Ram and flash
2026-04-07 08:45:08 +10:00
Willian Galvani a1136dcfef Sub: create and use param for controlling parameters migration 2026-04-07 08:30:43 +10:00
Willian Galvani 5ca4ea937b Sub: add parameters migration for lights and actuators 2026-04-07 08:30:43 +10:00
Willian Galvani c5634c8267 Sub: refactor jsbutton_function_is_assigned() out of has_disarm_function() 2026-04-07 08:30:43 +10:00
Hunter McClelland e37c92d040 BUILD.md: [minor] replace deprecated arg with new name 2026-04-07 08:29:03 +10:00
Thomas Watson dd9bd7a08a Tools: fix build_bootloaders debug symbol flag
The debug flag, contrary to its documentation, enables a debug build,
increasing the size of the binary and changing its contents. Fix the
documentation to describe what it actually does.

Then add the same flag as waf to just add symbols without changing the
actual binary.
2026-04-04 14:34:44 -05:00
Peter Barker cb3b3e2028 GCS_MAVLink: adjust for new SYS_STATUS fields 2026-04-04 12:48:24 +11:00
Peter Barker ec50d6f32a mavlink: reference master commit 2026-04-04 12:48:24 +11:00
Iampete1 124ebedfca AP_Scripting: fix language check issues 2026-04-04 09:29:55 +11:00
Peter Barker ca791330f7 hwdef: correct double-tick fixed-width markup to single-tick
former is rst-style, latter is markdown-style
2026-04-04 09:16:17 +11:00
Randy Mackay 3e40de50b1 AP_Scripting: hobbywing datalink link fix 2026-04-03 15:25:15 +09:00
Pierre Kancir e9f7d54730 .github: test_scripts: don't ardupilot container 2026-04-03 09:39:45 +11:00
Peter BarkerandClaude Sonnet 4.6 7ae671e53f AP_Mount: gate get_angle/rate_target behind AP_SCRIPTING_ENABLED; scripting backend fully self-contained
get_angle_target() and get_rate_target() in AP_Mount_Backend and AP_Mount
are now declared and defined only when AP_SCRIPTING_ENABLED is set,
matching the existing treatment of get_location_target().

AP_Mount_Backend::write_log() read mnt_target directly when scripting is
not compiled in, avoiding the dependency on those methods.

AP_Mount_Scripting gains its own ScriptTargetType enum and
_angle_target/_rate_target members.  send_target_angles() and
send_target_rates() now store the pushed target into those members.
get_angle_target() / get_rate_target() overrides return the stored values,
removing the previous hack of stamping mnt_target.target_type = ANGLE
inside send_target_angles().  _script_target_type is reset to NONE at the
top of each update() cycle so stale targets are never returned.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 15:46:16 +09:00
Peter BarkerandClaude Sonnet 4.6 14d09599de AP_Mount: fix scripting backend for non-angle target modes
Scripting backends (e.g. mount-djirs2-driver.lua) poll get_angle_target()
and get_rate_target() rather than receiving pushed targets.  Before this
fix, get_angle_target() returned false for RETRACT, NEUTRAL, and LOCATION
modes because it only checked target_type == ANGLE, even though
send_target_to_gimbal() had already written the converted angle into
mnt_target.angle_rad.

Fix by calling send_target_to_gimbal() from AP_Mount_Scripting::update()
(matching every other backend) and implementing send_target_angles() to
stamp mnt_target.target_type = ANGLE after send_target_to_gimbal() has
written the converted value into mnt_target.angle_rad.  This makes
get_angle_target() return the converted value without any changes to the
base class.

Declare NATIVE_ANGLES_AND_RATES_ONLY so that RATE targets are not
converted to angles internally; the Lua script receives them via
get_rate_target() and performs its own integration.  send_target_rates()
is a no-op because mnt_target.target_type stays RATE, which is all
get_rate_target() checks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 15:46:16 +09:00
Bob Long 801375751c AP_Mount: fix get_angle_target for converted cmds
If a backend gets the target mode converted to angle, get_angle_target
will return the converted angles. This fixes scripting backends that
relied on get_angle_target
2026-04-02 15:46:16 +09:00
Bob Long fe382bff86 autotest: add ScriptMountDriver test
Co-authored-by: Bob Long <robertlong13@gmail.com>
2026-04-02 15:46:16 +09:00
Bob Long 4bae7f6adf AP_Scripting: add mount-driver example 2026-04-02 15:46:16 +09:00
viewpro-caijie 4f1e86bf41 AP_HAL_ChibiOS:add VUAV-TinyV7 2026-04-01 19:35:46 +11:00
caijie b032d5fa60 bootloaders:Add VUAV-TinyV7 bootloader 2026-04-01 19:35:46 +11:00
caijie 232fff5c30 AP_Bootloader:Add VUAV-TinyV7 Board ID 2026-04-01 19:35:46 +11:00
Brown b6fb10b91c AP_InertialSensor: LSM6DSV driver review fixes
Address review feedback and follow-up self-review findings.

- Remove the unused polling path
- Fix the FS_G_4000DPS register setting
- Switch counter-based timing checks to wall-clock based logic
- Tighten FIFO buffer allocation/lifetime handling
- Clean up related initialization and SPI transfer documentation
2026-04-01 19:03:47 +11:00
Brown 3541365d66 AP_InertialSensor: refactor LSM6DSV register definitions
- Replace file-scope constexpr definitions with #define macros for register addresses, bit masks, and scaling factors, matching the style used by other IMU drivers in this library.
- Keep the register and configuration definitions to preserve a clear mapping to the datasheet, even when some are not used in the current code path.
- Avoid unused-const-variable warnings under Clang.
- Rename LSM6DSV_EXPERIMENTAL_PRIMARY_FIFO to LSM6DSV_USE_FIFO for clarity and consistency.
- Remove the unused _accel_range_g member.

No change to the default runtime behavior.
2026-04-01 19:03:47 +11:00
Brown 58b7de347c Pixhawk6C: add LSM6DSV16X IMU support
Add SPI device and IMU probe line for the LSM6DSV16X on Pixhawk6C.
The driver auto-detects the chip via WHOAMI so both ICM42688 and
LSM6DSV16X boards are supported without a board type change.
2026-04-01 19:03:47 +11:00
Brown dd8a3ddf3b AP_InertialSensor: add LSM6DSV driver
Add driver for the ST LSM6DSV16X 6-axis IMU with support for:
- WHOAMI-based chip detection (Invensensev3-style check_whoami)
- HAODR mode-1 for high-accuracy ODR (1000-8000 Hz)
- continuous FIFO burst reads
- fast sampling via INS_FAST_SAMPLE / INS_GYRO_RATE
- accelerometer second-stage LPF2
2026-04-01 19:03:47 +11:00
Peter Hall 6736801d21 Plane: drop AHRS out of full rate attitude logging 2026-04-01 18:48:45 +11:00
Yuan-Chu Tai 371ba17363 GCS_MAVLink: fix comments 2026-04-01 10:53:44 +09:00
Thomas Watson 44bcefb1ed AP_NavEKF3: loop over states in FuseBodyVel Kalman gain computation
Same form and coefficients for most elements. Saves lots of flash.
2026-04-01 08:48:20 +11:00
Henry Wurzburg da96a9196f Tools: autotest throw mode enable/disable 2026-04-01 08:46:32 +11:00
Henry Wurzburg 55bbd39946 Tools: build server support for throw mode 2026-04-01 08:46:32 +11:00