• 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/component_information/component_information.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
4
// https://github.com/mavlink/MAVSDK-Proto/blob/master/protos/component_information/component_information.proto)
5

6
#include <iomanip>
7

8
#include "component_information_impl.h"
9
#include "plugins/component_information/component_information.h"
10

11
namespace mavsdk {
12

13
using FloatParam = ComponentInformation::FloatParam;
14
using FloatParamUpdate = ComponentInformation::FloatParamUpdate;
15

16
ComponentInformation::ComponentInformation(System& system) :
×
17
    PluginBase(),
18
    _impl{std::make_unique<ComponentInformationImpl>(system)}
×
19
{}
×
20

21
ComponentInformation::ComponentInformation(std::shared_ptr<System> system) :
×
22
    PluginBase(),
23
    _impl{std::make_unique<ComponentInformationImpl>(system)}
×
24
{}
×
25

26
ComponentInformation::~ComponentInformation() {}
×
27

28
std::pair<ComponentInformation::Result, std::vector<ComponentInformation::FloatParam>>
29
ComponentInformation::access_float_params() const
×
30
{
31
    return _impl->access_float_params();
×
32
}
33

34
ComponentInformation::FloatParamHandle
35
ComponentInformation::subscribe_float_param(const FloatParamCallback& callback)
×
36
{
37
    return _impl->subscribe_float_param(callback);
×
38
}
39

40
void ComponentInformation::unsubscribe_float_param(FloatParamHandle handle)
×
41
{
42
    _impl->unsubscribe_float_param(handle);
×
43
}
×
44

45
bool operator==(
×
46
    const ComponentInformation::FloatParam& lhs, const ComponentInformation::FloatParam& rhs)
47
{
48
    return (rhs.name == lhs.name) && (rhs.short_description == lhs.short_description) &&
×
49
           (rhs.long_description == lhs.long_description) && (rhs.unit == lhs.unit) &&
×
50
           (rhs.decimal_places == lhs.decimal_places) &&
×
51
           ((std::isnan(rhs.start_value) && std::isnan(lhs.start_value)) ||
×
52
            rhs.start_value == lhs.start_value) &&
×
53
           ((std::isnan(rhs.default_value) && std::isnan(lhs.default_value)) ||
×
54
            rhs.default_value == lhs.default_value) &&
×
55
           ((std::isnan(rhs.min_value) && std::isnan(lhs.min_value)) ||
×
56
            rhs.min_value == lhs.min_value) &&
×
57
           ((std::isnan(rhs.max_value) && std::isnan(lhs.max_value)) ||
×
58
            rhs.max_value == lhs.max_value);
×
59
}
60

61
std::ostream& operator<<(std::ostream& str, ComponentInformation::FloatParam const& float_param)
×
62
{
63
    str << std::setprecision(15);
×
64
    str << "float_param:" << '\n' << "{\n";
×
65
    str << "    name: " << float_param.name << '\n';
×
66
    str << "    short_description: " << float_param.short_description << '\n';
×
67
    str << "    long_description: " << float_param.long_description << '\n';
×
68
    str << "    unit: " << float_param.unit << '\n';
×
69
    str << "    decimal_places: " << float_param.decimal_places << '\n';
×
70
    str << "    start_value: " << float_param.start_value << '\n';
×
71
    str << "    default_value: " << float_param.default_value << '\n';
×
72
    str << "    min_value: " << float_param.min_value << '\n';
×
73
    str << "    max_value: " << float_param.max_value << '\n';
×
74
    str << '}';
×
75
    return str;
×
76
}
77

78
bool operator==(
×
79
    const ComponentInformation::FloatParamUpdate& lhs,
80
    const ComponentInformation::FloatParamUpdate& rhs)
81
{
82
    return (rhs.name == lhs.name) &&
×
83
           ((std::isnan(rhs.value) && std::isnan(lhs.value)) || rhs.value == lhs.value);
×
84
}
85

86
std::ostream&
87
operator<<(std::ostream& str, ComponentInformation::FloatParamUpdate const& float_param_update)
×
88
{
89
    str << std::setprecision(15);
×
90
    str << "float_param_update:" << '\n' << "{\n";
×
91
    str << "    name: " << float_param_update.name << '\n';
×
92
    str << "    value: " << float_param_update.value << '\n';
×
93
    str << '}';
×
94
    return str;
×
95
}
96

97
std::ostream& operator<<(std::ostream& str, ComponentInformation::Result const& result)
×
98
{
99
    switch (result) {
×
100
        case ComponentInformation::Result::Unknown:
×
101
            return str << "Unknown";
×
102
        case ComponentInformation::Result::Success:
×
103
            return str << "Success";
×
104
        case ComponentInformation::Result::NoSystem:
×
105
            return str << "No System";
×
106
        default:
×
107
            return str << "Unknown";
×
108
    }
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

© 2025 Coveralls, Inc