From 27e6a0d2270f09ca8166aa18492ad3e20c382e2c 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 2b609159db..a9061ad33b 100644 --- a/src/modules/commander/Commander.cpp +++ b/src/modules/commander/Commander.cpp @@ -701,7 +701,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)) {