Skip to content

Commit 0293530

Browse files
julianoespeterbarker
authored andcommitted
common.xml: mirror GIMBAL_DEVICE and GIMBAL_MANAGER cap flags (mavlink#2414)
This is an attempt to fix the gimbal device vs. manager flags. Instead of capping the device flags at 16 bits, we add an extension for 32 bits, and we copy any manager flags across. For backwards compatibility, a gimbal device needs to set the 16 lower bits as well as the new 32 bits. A ground station or gimbal manager can tell whether a gimbal device supports the new 32 bit flag if it is non-zero.
1 parent d2a4023 commit 0293530

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

message_definitions/v1.0/common.xml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,15 @@
431431
<entry value="8192" name="GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS">
432432
<description>Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation.</description>
433433
</entry>
434+
<entry value="65536" name="GIMBAL_DEVICE_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL">
435+
<description>Gimbal device supports to point to a local position.</description>
436+
</entry>
437+
<entry value="131072" name="GIMBAL_DEVICE_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL">
438+
<description>Gimbal device supports to point to a global latitude, longitude, altitude position.</description>
439+
</entry>
434440
</enum>
435441
<enum name="GIMBAL_MANAGER_CAP_FLAGS" bitmask="true">
436-
<description>Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags.</description>
442+
<description>Gimbal manager high level capability flags (bitmap). The flags are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags.</description>
437443
<entry value="1" name="GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT">
438444
<description>Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT.</description>
439445
</entry>
@@ -477,10 +483,10 @@
477483
<description>Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS.</description>
478484
</entry>
479485
<entry value="65536" name="GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL">
480-
<description>Gimbal manager supports to point to a local position.</description>
486+
<description>Based on GIMBAL_DEVICE_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL.</description>
481487
</entry>
482488
<entry value="131072" name="GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL">
483-
<description>Gimbal manager supports to point to a global latitude, longitude, altitude position.</description>
489+
<description>Based on GIMBAL_DEVICE_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL.</description>
484490
</entry>
485491
</enum>
486492
<enum name="GIMBAL_DEVICE_FLAGS" bitmask="true">
@@ -6889,6 +6895,7 @@
68896895
<field type="float" name="yaw_max" units="rad" invalid="NaN">Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown.</field>
68906896
<extensions/>
68916897
<field type="uint8_t" name="gimbal_device_id" invalid="0">This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0.</field>
6898+
<field type="uint32_t" name="cap_flags2" enum="GIMBAL_DEVICE_CAP_FLAGS" invalid="0">Extended bitmap of gimbal capability flags (32 bit). For backwards compatibility, the lower 16 bits should also be set in cap_flags. Ground stations should prefer this field if non-zero.</field>
68926899
</message>
68936900
<message id="284" name="GIMBAL_DEVICE_SET_ATTITUDE">
68946901
<description>Low level message to control a gimbal device's attitude.

0 commit comments

Comments
 (0)