Skip to content

Commit

Permalink
AUTOPILOT.capabilities includes gimbal manager protocol bit (#23692)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
hamishwillee and julianoes authored Oct 16, 2024
1 parent a0e6f9c commit b390d58
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modules/mavlink/mavlink
15 changes: 15 additions & 0 deletions src/modules/mavlink/mavlink_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit b390d58

Please sign in to comment.