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

mavlink / MAVSDK / 7965506471

19 Feb 2024 09:51PM CUT coverage: 36.22% (+0.008%) from 36.212%
7965506471

push

github

web-flow
Merge pull request #2223 from mavlink/pr-absl-fix

Fix illegal instruction on RPi 4

10035 of 27706 relevant lines covered (36.22%)

127.69 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

57
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
bool operator==(const Calibration::ProgressData& lhs, const Calibration::ProgressData& rhs)
×
90
{
91
    return (rhs.has_progress == lhs.has_progress) &&
×
92
           ((std::isnan(rhs.progress) && std::isnan(lhs.progress)) ||
×
93
            rhs.progress == lhs.progress) &&
×
94
           (rhs.has_status_text == lhs.has_status_text) && (rhs.status_text == lhs.status_text);
×
95
}
96

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

109
} // 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

© 2025 Coveralls, Inc