mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-15 15:27:34 +08:00
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:
Submodule src/modules/mavlink/mavlink updated: bb52e30d2b...b4add52929
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user