From 12f6affdfabb785750a2b63ffd196dfb09b65934 Mon Sep 17 00:00:00 2001 From: acfloria Date: Wed, 18 Apr 2018 14:06:48 +0200 Subject: [PATCH] Commander: Avoid sending ack for VEHICLE_CMD_CONTROL_HIGH_LATENCY if from_external is false --- src/modules/commander/commander.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index a7b5fba32e..89640c2d69 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -1021,7 +1021,10 @@ Commander::handle_command(vehicle_status_s *status_local, const vehicle_command_ break; case vehicle_command_s::VEHICLE_CMD_CONTROL_HIGH_LATENCY: { // only send the acknowledge from the commander, the command actually is handled by each mavlink instance - cmd_result = vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED; + // only send the acknowledge if the command is received from an external source + if (cmd.from_external) { + cmd_result = vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED; + } } break;