GCS_MAVLink: handle request autopilot capabilities as both long and int

This commit is contained in:
Peter Barker 2023-11-08 20:57:02 +11:00 committed by Peter Barker
parent d189730b9f
commit b572fe80ec
2 changed files with 7 additions and 9 deletions

View File

@ -598,7 +598,7 @@ protected:
void handle_send_autopilot_version(const mavlink_message_t &msg);
#endif
#if AP_MAVLINK_MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES_ENABLED
MAV_RESULT handle_command_request_autopilot_capabilities(const mavlink_command_long_t &packet);
MAV_RESULT handle_command_request_autopilot_capabilities(const mavlink_command_int_t &packet);
#endif
virtual void send_banner();

View File

@ -4519,7 +4519,7 @@ MAV_RESULT GCS_MAVLINK::handle_command_battery_reset(const mavlink_command_int_t
#endif
#if AP_MAVLINK_MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES_ENABLED
MAV_RESULT GCS_MAVLINK::handle_command_request_autopilot_capabilities(const mavlink_command_long_t &packet)
MAV_RESULT GCS_MAVLINK::handle_command_request_autopilot_capabilities(const mavlink_command_int_t &packet)
{
if (!is_equal(packet.param1,1.0f)) {
return MAV_RESULT_FAILED;
@ -4757,13 +4757,6 @@ MAV_RESULT GCS_MAVLINK::handle_command_long_packet(const mavlink_command_long_t
switch (packet.command) {
#if AP_MAVLINK_MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES_ENABLED
case MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES: {
result = handle_command_request_autopilot_capabilities(packet);
break;
}
#endif
case MAV_CMD_DO_JUMP_TAG:
result = handle_command_do_jump_tag(packet);
break;
@ -5177,6 +5170,11 @@ MAV_RESULT GCS_MAVLINK::handle_command_int_packet(const mavlink_command_int_t &p
return handle_servorelay_message(packet);
#endif
#if AP_MAVLINK_MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES_ENABLED
case MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES:
return handle_command_request_autopilot_capabilities(packet);
#endif
case MAV_CMD_RUN_PREARM_CHECKS:
return handle_command_run_prearm_checks(packet);