AUTOPILOT.capabilities includes gimbal manager protocol bit (#23692)

* AUTOPILOT.capabilities includes gimbal manager protocol bit

Sets MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER bit in AUTOPILOT.capabilities

* mavlink: update submodule

* mavlink: only set gimbal flag if gimbal param set

We should probably only set the flag if the gimbal manager is actually
set up using the MNT_MODE_IN parameter.

* mavlink: make param optional

If the gimbal module is not built in we don't have the MNT_MODE_IN
param, so we need to deal with that.

* gazebo-classic: update submodule

---------

Co-authored-by: Julian Oes <julian@oes.ch>
This commit is contained in:
Hamish Willee 2024-10-17 08:41:38 +11:00 committed by GitHub
parent a0e6f9cd70
commit b390d5876a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 2 deletions

@ -1 +1 @@
Subproject commit f1d11a6126990d487d4aa8ff68c23ff370516510
Subproject commit c0e0751341d46108377bbae2ae1bb6da8a5d4106

@ -1 +1 @@
Subproject commit bb52e30d2b924d5a250f2400144d33012271a19d
Subproject commit b4add5292992cc43bd471b431b425338787982be

View File

@ -1074,6 +1074,21 @@ Mavlink::send_autopilot_capabilities()
msg.capabilities |= MAV_PROTOCOL_CAPABILITY_MAVLINK2;
msg.capabilities |= MAV_PROTOCOL_CAPABILITY_MISSION_FENCE;
msg.capabilities |= MAV_PROTOCOL_CAPABILITY_MISSION_RALLY;
{
param_t param_handle = param_find_no_notification("MNT_MODE_IN");
int32_t mnt_mode_in = 0;
if (mnt_mode_in != PARAM_INVALID) {
param_get(param_handle, &mnt_mode_in);
if (mnt_mode_in == 4) {
msg.capabilities |= MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER;
}
}
}
msg.flight_sw_version = px4_firmware_version();
msg.middleware_sw_version = px4_firmware_version();
msg.os_sw_version = px4_os_version();