From 3a918e8d4895c61a3061fb528242cb7f0e0154bc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 16 Jul 2026 09:20:18 +1000 Subject: [PATCH 1/3] common,standard: add byte-wise union param types for lossless int32 params Add MAV_PARAM_TYPE_UNION_INT32/UNION_UINT32: the four bytes of the param_value float field carry the memcpy'd integer, used by C-cast encoded systems only when an int32 parameter value is not exactly representable as a 32-bit float. Add MAV_PROTOCOL_CAPABILITY_PARAM_UNION_INT32 so ground stations can detect support before sending the union types in PARAM_SET. --- message_definitions/v1.0/common.xml | 6 ++++++ message_definitions/v1.0/standard.xml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/message_definitions/v1.0/common.xml b/message_definitions/v1.0/common.xml index c26a6e676f3..ee7f8e9ca68 100644 --- a/message_definitions/v1.0/common.xml +++ b/message_definitions/v1.0/common.xml @@ -2747,6 +2747,12 @@ 64-bit floating-point + + 32-bit signed integer carried byte-wise in the param_value field. + + + 32-bit unsigned integer carried byte-wise in the param_value field. + diff --git a/message_definitions/v1.0/standard.xml b/message_definitions/v1.0/standard.xml index df63c937817..f1b8327c206 100644 --- a/message_definitions/v1.0/standard.xml +++ b/message_definitions/v1.0/standard.xml @@ -90,6 +90,9 @@ Autopilot has a connected gripper. MAVLink Grippers would set MAV_TYPE_GRIPPER instead. + + Component accepts PARAM_SET and emits PARAM_VALUE with the byte-wise MAV_PARAM_TYPE_UNION_INT32/MAV_PARAM_TYPE_UNION_UINT32 types for lossless transport of 32-bit integer parameter values that are not exactly representable as a 32-bit float. Only meaningful in combination with MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST: byte-wise encoded systems are already lossless. Ground stations should should send the union types to a component that does not advertise this capability. + These values define the type of firmware release. These values indicate the first version or release of this type. For example the first alpha release would be 64, the second would be 65. From cc75edf7e72f40703c586a73db8127fcf19722dd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 16 Jul 2026 09:45:00 +1000 Subject: [PATCH 2/3] pymavlink: submodule update for byte-wise union param types --- pymavlink | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymavlink b/pymavlink index ec06837a506..c065f0feb0c 160000 --- a/pymavlink +++ b/pymavlink @@ -1 +1 @@ -Subproject commit ec06837a50688b5974094876c3c9d1b8bf86629d +Subproject commit c065f0feb0ceacc35a8344945a46924b0a8a1a5a From bddfa431b071f7ccbabd278f91c626c42c4f60f2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 16 Jul 2026 09:48:42 +1000 Subject: [PATCH 3/3] common: sync MAV_PARAM_ERROR type entries from upstream Bring in MAV_PARAM_ERROR_TYPE_UNSUPPORTED and TYPE_MISMATCH so firmware can report a type mismatch for byte-wise union param sets. --- message_definitions/v1.0/common.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/message_definitions/v1.0/common.xml b/message_definitions/v1.0/common.xml index ee7f8e9ca68..fe66fd543eb 100644 --- a/message_definitions/v1.0/common.xml +++ b/message_definitions/v1.0/common.xml @@ -2776,6 +2776,12 @@ Parameter is read-only + + Parameter data type (MAV_PARAM_TYPE) is not supported by flight stack (at all) + + + Parameter type does not match expected type + Specifies the datatype of a MAVLink extended parameter.