• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mavlink / MAVSDK / 24114167644

08 Apr 2026 02:17AM UTC coverage: 50.468% (+0.003%) from 50.465%
24114167644

push

github

web-flow
core: hide symbols by default, export only public API (#2855)

* core: hide symbols by default, export only public API

Backport of #2824 to v3. Fixes segfault when MAVSDK is used alongside
ROS2 (or any library sharing bundled dependencies like OpenSSL/tinyxml2)
due to symbol conflicts from leaked third-party symbols.

- Add mavsdk_export.h with MAVSDK_PUBLIC, MAVSDK_TEST_EXPORT, and
  MAVSDK_TEMPL_INST macros
- Set CXX_VISIBILITY_PRESET=hidden and VISIBILITY_INLINES_HIDDEN=ON
- MAVSDK_SHARED compile definition gates dllexport/dllimport so that
  static builds on Windows are unaffected
- Annotate all public classes, free functions, operator overloads,
  and explicit template instantiations
- Update jinja2 templates to emit MAVSDK_PUBLIC on generated
  operator== and operator<< definitions
- Disable MSVC C4251 warning for DLL interface on STL members

Fixes #2852

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: remove stale asio includes from mission transfer client header

The backport patch incorrectly added asio includes that don't exist on
v3 (they were added on main after v3 branched).

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

15 of 379 new or added lines in 39 files covered. (3.96%)

4 existing lines in 3 files now uncovered.

19248 of 38139 relevant lines covered (50.47%)

672.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/mavsdk/plugins/calibration/calibration.cpp
1
// WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited.
2
// Edits need to be made to the proto files
3
// (see https://github.com/mavlink/MAVSDK-Proto/blob/master/protos/calibration/calibration.proto)
4

5
#include <iomanip>
6

7
#include "calibration_impl.h"
8
#include "plugins/calibration/calibration.h"
9

10
namespace mavsdk {
11

12
using ProgressData = Calibration::ProgressData;
13

14
Calibration::Calibration(System& system) :
×
15
    PluginBase(),
16
    _impl{std::make_unique<CalibrationImpl>(system)}
×
17
{}
×
18

19
Calibration::Calibration(std::shared_ptr<System> system) :
×
20
    PluginBase(),
21
    _impl{std::make_unique<CalibrationImpl>(system)}
×
22
{}
×
23

24
Calibration::~Calibration() {}
×
25

26
void Calibration::calibrate_gyro_async(const CalibrateGyroCallback& callback)
×
27
{
28
    _impl->calibrate_gyro_async(callback);
×
29
}
×
30

31
void Calibration::calibrate_accelerometer_async(const CalibrateAccelerometerCallback& callback)
×
32
{
33
    _impl->calibrate_accelerometer_async(callback);
×
34
}
×
35

36
void Calibration::calibrate_magnetometer_async(const CalibrateMagnetometerCallback& callback)
×
37
{
38
    _impl->calibrate_magnetometer_async(callback);
×
39
}
×
40

41
void Calibration::calibrate_level_horizon_async(const CalibrateLevelHorizonCallback& callback)
×
42
{
43
    _impl->calibrate_level_horizon_async(callback);
×
44
}
×
45

46
void Calibration::calibrate_gimbal_accelerometer_async(
×
47
    const CalibrateGimbalAccelerometerCallback& callback)
48
{
49
    _impl->calibrate_gimbal_accelerometer_async(callback);
×
50
}
×
51

52
Calibration::Result Calibration::cancel() const
×
53
{
54
    return _impl->cancel();
×
55
}
56

NEW
57
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, Calibration::Result const& result)
×
58
{
59
    switch (result) {
×
60
        case Calibration::Result::Unknown:
×
61
            return str << "Unknown";
×
62
        case Calibration::Result::Success:
×
63
            return str << "Success";
×
64
        case Calibration::Result::Next:
×
65
            return str << "Next";
×
66
        case Calibration::Result::Failed:
×
67
            return str << "Failed";
×
68
        case Calibration::Result::NoSystem:
×
69
            return str << "No System";
×
70
        case Calibration::Result::ConnectionError:
×
71
            return str << "Connection Error";
×
72
        case Calibration::Result::Busy:
×
73
            return str << "Busy";
×
74
        case Calibration::Result::CommandDenied:
×
75
            return str << "Command Denied";
×
76
        case Calibration::Result::Timeout:
×
77
            return str << "Timeout";
×
78
        case Calibration::Result::Cancelled:
×
79
            return str << "Cancelled";
×
80
        case Calibration::Result::FailedArmed:
×
81
            return str << "Failed Armed";
×
82
        case Calibration::Result::Unsupported:
×
83
            return str << "Unsupported";
×
84
        default:
×
85
            return str << "Unknown";
×
86
    }
87
}
88

89
MAVSDK_PUBLIC bool
NEW
90
operator==(const Calibration::ProgressData& lhs, const Calibration::ProgressData& rhs)
×
91
{
92
    return (rhs.has_progress == lhs.has_progress) &&
×
93
           ((std::isnan(rhs.progress) && std::isnan(lhs.progress)) ||
×
94
            rhs.progress == lhs.progress) &&
×
95
           (rhs.has_status_text == lhs.has_status_text) && (rhs.status_text == lhs.status_text);
×
96
}
97

98
MAVSDK_PUBLIC std::ostream&
NEW
99
operator<<(std::ostream& str, Calibration::ProgressData const& progress_data)
×
100
{
101
    str << std::setprecision(15);
×
102
    str << "progress_data:" << '\n' << "{\n";
×
103
    str << "    has_progress: " << progress_data.has_progress << '\n';
×
104
    str << "    progress: " << progress_data.progress << '\n';
×
105
    str << "    has_status_text: " << progress_data.has_status_text << '\n';
×
106
    str << "    status_text: " << progress_data.status_text << '\n';
×
107
    str << '}';
×
108
    return str;
×
109
}
110

111
} // namespace mavsdk
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc