From a1cd4fd5df588a5722be69cbc0eeb8ea9931c472 Mon Sep 17 00:00:00 2001 From: Thomas Stastny Date: Wed, 13 Sep 2023 19:20:53 +0200 Subject: [PATCH] Commander: make sure unsupported do reposition command result is published todo: need to consolidate the command ack strategy in this function --- src/modules/commander/Commander.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/commander/Commander.cpp b/src/modules/commander/Commander.cpp index 7cb6cd6577..c25e27a74d 100644 --- a/src/modules/commander/Commander.cpp +++ b/src/modules/commander/Commander.cpp @@ -724,7 +724,7 @@ Commander::handle_command(const vehicle_command_s &cmd) const bool unsupported_bits_set = (change_mode_flags & ~1) != 0; if (mode_switch_not_requested || unsupported_bits_set) { - cmd_result = vehicle_command_ack_s::VEHICLE_CMD_RESULT_UNSUPPORTED; + answer_command(cmd, vehicle_command_ack_s::VEHICLE_CMD_RESULT_UNSUPPORTED); } else { if (_user_mode_intention.change(vehicle_status_s::NAVIGATION_STATE_AUTO_LOITER)) {