From 88521b0145e24a00f768e842ac0ac580dac33663 Mon Sep 17 00:00:00 2001 From: DanielePettenuzzo Date: Mon, 20 Dec 2021 14:13:44 +0100 Subject: [PATCH] print error only if the mavlink command fails In some cases we printed also the mavlink commands that replied to be unsupported. This is not an error to show in the log. --- src/modules/mavlink/mavlink_receiver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index 809789191b..6852f85036 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -780,7 +780,7 @@ MavlinkReceiver::handle_message_command_ack(mavlink_message_t *msg) _cmd_ack_pub.publish(command_ack); // TODO: move it to the same place that sent the command - if (ack.result != MAV_RESULT_ACCEPTED && ack.result != MAV_RESULT_IN_PROGRESS) { + if (ack.result == MAV_RESULT_FAILED) { if (msg->compid == MAV_COMP_ID_CAMERA) { PX4_WARN("Got unsuccessful result %" PRIu8 " from camera", ack.result); }