From bcaffdda9bd5ce5d9a7e820109af6050c5027821 Mon Sep 17 00:00:00 2001 From: fibonacci-matrix <176021117+fibonacci-matrix@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:32:56 +0300 Subject: [PATCH 1/2] core: Fixed unnecessary repeateded invocations of `notify_on_discover` This problem introduced in v2.10.1 Now it works only if there was a change in the connection status --- src/mavsdk/core/system_impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mavsdk/core/system_impl.cpp b/src/mavsdk/core/system_impl.cpp index 52e9added..d9be967e1 100644 --- a/src/mavsdk/core/system_impl.cpp +++ b/src/mavsdk/core/system_impl.cpp @@ -532,9 +532,9 @@ void SystemImpl::set_connected() // If not yet connected there is nothing to do/ } - _mavsdk_impl.notify_on_discover(); - if (enable_needed) { + _mavsdk_impl.notify_on_discover(); + if (has_autopilot()) { send_autopilot_version_request(); } From 15918a861d1af5add09ab292e49917eac498b4df Mon Sep 17 00:00:00 2001 From: fibonacci-matrix <176021117+fibonacci-matrix@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:10:22 +0300 Subject: [PATCH 2/2] Update system_impl.cpp - fix empty line --- src/mavsdk/core/system_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mavsdk/core/system_impl.cpp b/src/mavsdk/core/system_impl.cpp index d9be967e1..73c411407 100644 --- a/src/mavsdk/core/system_impl.cpp +++ b/src/mavsdk/core/system_impl.cpp @@ -534,7 +534,7 @@ void SystemImpl::set_connected() if (enable_needed) { _mavsdk_impl.notify_on_discover(); - + if (has_autopilot()) { send_autopilot_version_request(); }