GCS_Mavlink: Fix advertised autopilot capabilities

Some capabilities are available but not advertised.

FIXME: MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT is deprecated!
This commit is contained in:
Patrick Menschel 2024-12-17 20:43:48 +01:00
parent 7856294334
commit eaee905875
1 changed files with 13 additions and 1 deletions

View File

@ -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) {