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.
This commit is contained in:
DanielePettenuzzo
2021-12-21 07:37:23 +01:00
committed by Beat Küng
parent 199b5e7d48
commit 88521b0145
+1 -1
View File
@@ -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);
}