mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-13 16:01:36 +08:00
mavlink_command_sender: fix logic after first test
- change/add a few printfs so they make more sense - don't accidentally ignore command_acks - don't forward commands to the same component id, and don't forward commands that are broadcast to all components (target component 0)
This commit is contained in:
@@ -628,9 +628,9 @@ MavlinkReceiver::handle_message_command_ack(mavlink_message_t *msg)
|
||||
mavlink_command_ack_t ack;
|
||||
mavlink_msg_command_ack_decode(msg, &ack);
|
||||
|
||||
if (ack.result != MAV_RESULT_ACCEPTED && ack.result != MAV_RESULT_IN_PROGRESS) {
|
||||
MavlinkCommandSender::instance().handle_mavlink_command_ack(ack, msg->sysid, msg->compid);
|
||||
MavlinkCommandSender::instance().handle_mavlink_command_ack(ack, msg->sysid, msg->compid);
|
||||
|
||||
if (ack.result != MAV_RESULT_ACCEPTED && ack.result != MAV_RESULT_IN_PROGRESS) {
|
||||
if (msg->compid == MAV_COMP_ID_CAMERA) {
|
||||
PX4_WARN("Got unsuccessful result %d from camera", ack.result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user