From 34b48f78ae824858ab0c8b9b5748f12a074dbc4a Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Tue, 10 Oct 2023 08:21:05 +0200 Subject: [PATCH 1/2] Mute warning due to mavsdk /usr/local/include/mavsdk/plugins/mavlink_passthrough/mavlink/v2.0/common/../mavlink_helpers.h:578:6: warning: variable 'bufferIndex' set but not used [-Wunused-but-set-variable] --- modules/robot/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/robot/CMakeLists.txt b/modules/robot/CMakeLists.txt index b20f96706e..b376dc5517 100644 --- a/modules/robot/CMakeLists.txt +++ b/modules/robot/CMakeLists.txt @@ -218,6 +218,10 @@ if(USE_UR_RTDE) vp_set_source_file_compile_flag(src/real-robot/universal-robots/vpRobotUniversalRobots.cpp -Wno-unused-parameter) endif() +if(USE_MAVSDK) + vp_set_source_file_compile_flag(src/real-robot/mavsdk/vpRobotMavsdk.cp -Wno-unused-but-set-variable) +endif() + vp_set_source_file_compile_flag(src/light/vpRingLight.cpp -Wno-strict-overflow) vp_set_source_file_compile_flag(src/wireframe-simulator/vpClipping.cpp -Wno-strict-overflow) vp_set_source_file_compile_flag(src/wireframe-simulator/vpBoundio.cpp -Wno-strict-overflow) From 2c129ef9690bd6042451e99395bba2c6a8ea392f Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Tue, 10 Oct 2023 08:22:09 +0200 Subject: [PATCH 2/2] Fix warning in vpRobotMavsdk.cpp visp/modules/robot/src/real-robot/mavsdk/vpRobotMavsdk.cpp:1115:8: warning: private field 'm_system_ready' is not used [-Wunused-private-field] --- .../robot/src/real-robot/mavsdk/vpRobotMavsdk.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/modules/robot/src/real-robot/mavsdk/vpRobotMavsdk.cpp b/modules/robot/src/real-robot/mavsdk/vpRobotMavsdk.cpp index 8273e35e77..cb6d242e6a 100644 --- a/modules/robot/src/real-robot/mavsdk/vpRobotMavsdk.cpp +++ b/modules/robot/src/real-robot/mavsdk/vpRobotMavsdk.cpp @@ -193,7 +193,7 @@ class vpRobotMavsdk::vpRobotMavsdkImpl calibration_promise.set_value(); break; } - }; + }; } void calibrate_gyro(mavsdk::Calibration &calibration) @@ -1086,18 +1086,6 @@ class vpRobotMavsdk::vpRobotMavsdkImpl void setVerbose(bool verbose) { m_verbose = verbose; } - // void waitSystemReady() - // { - // if (! m_system_ready) - // { - // while (!m_telemetry.get()->health_all_ok()) { - // std::cout << "Waiting for system to be ready\n"; - // sleep_for(seconds(1)); - // } - // std::cout << "System is ready\n"; - // } - // } - private: //*** Attributes ***// std::string m_address {}; ///< Ip address of the robot to discover on the network @@ -1112,7 +1100,6 @@ class vpRobotMavsdk::vpRobotMavsdkImpl MAV_TYPE m_mav_type {}; // Vehicle type bool m_has_flying_capability { false }; - bool m_system_ready { false }; float m_position_incertitude { 0.05 }; float m_yaw_incertitude { 0.09 }; // 5 deg bool m_verbose { false };