Skip to content

Commit

Permalink
GCS_Mavlink: Fix advertised autopilot capabilities
Browse files Browse the repository at this point in the history
Some capabilities are available but not advertised.

FIXME: MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT is deprecated!
  • Loading branch information
menschel committed Dec 17, 2024
1 parent 7856294 commit eaee905
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion libraries/GCS_MAVLink/GCS_Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7098,8 +7098,20 @@ bool GCS_MAVLINK::mavlink_coordinate_frame_to_location_alt_frame(const MAV_FRAME

uint64_t GCS_MAVLINK::capabilities() const
{
/**
* Basic capabilities, changed December 2024
* - Param float (FIXME: deprecated since 2022)
* - Compass calibration (already there, not checked)
* - Mission Int (added, code is there)
* - Command Int (added, code is there)
* - Set Position Target Global Int (added, code is there, used for guided mode)
* - param encode c cast (TODO: should be added, code is there)
*/
uint64_t ret = MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT |
MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION;
MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION |
MAV_PROTOCOL_CAPABILITY_MISSION_INT |
MAV_PROTOCOL_CAPABILITY_COMMAND_INT |
MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT;

const auto mavlink_protocol = uartstate->get_protocol();
if (mavlink_protocol == AP_SerialManager::SerialProtocol_MAVLink2 || mavlink_protocol == AP_SerialManager::SerialProtocol_MAVLinkHL) {
Expand Down

0 comments on commit eaee905

Please sign in to comment.