From 8b0b644c1194d66af5447d9ab8877c3622c87940 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 25 Apr 2020 08:21:20 +1000 Subject: [PATCH] GCS_MAVLink: correct check for payload space for COMMAND_ACK --- libraries/GCS_MAVLink/GCS_Common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 49b24a8470..3fac84d2be 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -2079,7 +2079,7 @@ void GCS_MAVLINK::handle_set_mode(const mavlink_message_t &msg) // command. The command we are acking (ID=11) doesn't actually // exist, but if it did we'd probably be acking something // completely unrelated to setting modes. - if (HAVE_PAYLOAD_SPACE(chan, MAVLINK_MSG_ID_COMMAND_ACK)) { + if (HAVE_PAYLOAD_SPACE(chan, COMMAND_ACK)) { mavlink_msg_command_ack_send(chan, MAVLINK_MSG_ID_SET_MODE, result); } }