From 816b5f679ebbeadd4a972756b47d30a7bf2f50b1 Mon Sep 17 00:00:00 2001 From: JaeyoungLim Date: Thu, 2 Nov 2023 03:50:23 +0100 Subject: [PATCH 1/3] Request mode change for action MAV_CMD_DO_REPOSITION --- src/mavsdk/plugins/action/action_impl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mavsdk/plugins/action/action_impl.cpp b/src/mavsdk/plugins/action/action_impl.cpp index 11aa582b22..55570f20b9 100644 --- a/src/mavsdk/plugins/action/action_impl.cpp +++ b/src/mavsdk/plugins/action/action_impl.cpp @@ -455,6 +455,7 @@ void ActionImpl::goto_location_async( command.params.x = int32_t(std::round(latitude_deg * 1e7)); command.params.y = int32_t(std::round(longitude_deg * 1e7)); command.params.maybe_z = altitude_amsl_m; + command.params.maybe_param2 = 1; _system_impl->send_command_async( command, [this, callback](MavlinkCommandSender::Result result, float) { From 5e98e886c3490c7a34fe6587f8b8f0cc0ae941b7 Mon Sep 17 00:00:00 2001 From: JaeyoungLim Date: Thu, 2 Nov 2023 08:10:48 +0100 Subject: [PATCH 2/3] Update src/mavsdk/plugins/action/action_impl.cpp Co-authored-by: Julian Oes --- src/mavsdk/plugins/action/action_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mavsdk/plugins/action/action_impl.cpp b/src/mavsdk/plugins/action/action_impl.cpp index 55570f20b9..4b931f3330 100644 --- a/src/mavsdk/plugins/action/action_impl.cpp +++ b/src/mavsdk/plugins/action/action_impl.cpp @@ -455,7 +455,7 @@ void ActionImpl::goto_location_async( command.params.x = int32_t(std::round(latitude_deg * 1e7)); command.params.y = int32_t(std::round(longitude_deg * 1e7)); command.params.maybe_z = altitude_amsl_m; - command.params.maybe_param2 = 1; + command.params.maybe_param2 = MAV_DO_REPOSITION_FLAGS_CHANGE_MODE; _system_impl->send_command_async( command, [this, callback](MavlinkCommandSender::Result result, float) { From 4366b0c0590ebf9cd4ade1eacc64d39c6b0d74d7 Mon Sep 17 00:00:00 2001 From: Jaeyoung Lim Date: Thu, 2 Nov 2023 10:47:36 +0100 Subject: [PATCH 3/3] Update src/mavsdk/plugins/action/action_impl.cpp Co-authored-by: Jonas Vautherin --- src/mavsdk/plugins/action/action_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mavsdk/plugins/action/action_impl.cpp b/src/mavsdk/plugins/action/action_impl.cpp index 4b931f3330..01b8f3d401 100644 --- a/src/mavsdk/plugins/action/action_impl.cpp +++ b/src/mavsdk/plugins/action/action_impl.cpp @@ -455,7 +455,7 @@ void ActionImpl::goto_location_async( command.params.x = int32_t(std::round(latitude_deg * 1e7)); command.params.y = int32_t(std::round(longitude_deg * 1e7)); command.params.maybe_z = altitude_amsl_m; - command.params.maybe_param2 = MAV_DO_REPOSITION_FLAGS_CHANGE_MODE; + command.params.maybe_param2 = static_cast(MAV_DO_REPOSITION_FLAGS_CHANGE_MODE); _system_impl->send_command_async( command, [this, callback](MavlinkCommandSender::Result result, float) {