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

mavlink / MAVSDK / 11602202969

30 Oct 2024 09:50PM UTC coverage: 38.614% (+0.7%) from 37.918%
11602202969

Pull #2394

github

web-flow
Merge e66473b14 into cebb708a4
Pull Request #2394: Consolidate CI

12032 of 31160 relevant lines covered (38.61%)

246.44 hits per line

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

5.03
/src/mavsdk/plugins/action/action.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/action/action.proto)
4

5
#include <iomanip>
6

7
#include "action_impl.h"
8
#include "plugins/action/action.h"
9

10
namespace mavsdk {
11

12
Action::Action(System& system) : PluginBase(), _impl{std::make_unique<ActionImpl>(system)} {}
×
13

14
Action::Action(std::shared_ptr<System> system) :
1✔
15
    PluginBase(),
16
    _impl{std::make_unique<ActionImpl>(system)}
1✔
17
{}
1✔
18

19
Action::~Action() {}
1✔
20

21
void Action::arm_async(const ResultCallback callback)
×
22
{
23
    _impl->arm_async(callback);
×
24
}
×
25

26
Action::Result Action::arm() const
2✔
27
{
28
    return _impl->arm();
2✔
29
}
30

31
void Action::arm_force_async(const ResultCallback callback)
×
32
{
33
    _impl->arm_force_async(callback);
×
34
}
×
35

36
Action::Result Action::arm_force() const
×
37
{
38
    return _impl->arm_force();
×
39
}
40

41
void Action::disarm_async(const ResultCallback callback)
×
42
{
43
    _impl->disarm_async(callback);
×
44
}
×
45

46
Action::Result Action::disarm() const
2✔
47
{
48
    return _impl->disarm();
2✔
49
}
50

51
void Action::takeoff_async(const ResultCallback callback)
×
52
{
53
    _impl->takeoff_async(callback);
×
54
}
×
55

56
Action::Result Action::takeoff() const
×
57
{
58
    return _impl->takeoff();
×
59
}
60

61
void Action::land_async(const ResultCallback callback)
×
62
{
63
    _impl->land_async(callback);
×
64
}
×
65

66
Action::Result Action::land() const
×
67
{
68
    return _impl->land();
×
69
}
70

71
void Action::reboot_async(const ResultCallback callback)
×
72
{
73
    _impl->reboot_async(callback);
×
74
}
×
75

76
Action::Result Action::reboot() const
×
77
{
78
    return _impl->reboot();
×
79
}
80

81
void Action::shutdown_async(const ResultCallback callback)
×
82
{
83
    _impl->shutdown_async(callback);
×
84
}
×
85

86
Action::Result Action::shutdown() const
×
87
{
88
    return _impl->shutdown();
×
89
}
90

91
void Action::terminate_async(const ResultCallback callback)
×
92
{
93
    _impl->terminate_async(callback);
×
94
}
×
95

96
Action::Result Action::terminate() const
×
97
{
98
    return _impl->terminate();
×
99
}
100

101
void Action::kill_async(const ResultCallback callback)
×
102
{
103
    _impl->kill_async(callback);
×
104
}
×
105

106
Action::Result Action::kill() const
×
107
{
108
    return _impl->kill();
×
109
}
110

111
void Action::return_to_launch_async(const ResultCallback callback)
×
112
{
113
    _impl->return_to_launch_async(callback);
×
114
}
×
115

116
Action::Result Action::return_to_launch() const
×
117
{
118
    return _impl->return_to_launch();
×
119
}
120

121
void Action::goto_location_async(
×
122
    double latitude_deg,
123
    double longitude_deg,
124
    float absolute_altitude_m,
125
    float yaw_deg,
126
    const ResultCallback callback)
127
{
128
    _impl->goto_location_async(latitude_deg, longitude_deg, absolute_altitude_m, yaw_deg, callback);
×
129
}
×
130

131
Action::Result Action::goto_location(
×
132
    double latitude_deg, double longitude_deg, float absolute_altitude_m, float yaw_deg) const
133
{
134
    return _impl->goto_location(latitude_deg, longitude_deg, absolute_altitude_m, yaw_deg);
×
135
}
136

137
void Action::do_orbit_async(
×
138
    float radius_m,
139
    float velocity_ms,
140
    OrbitYawBehavior yaw_behavior,
141
    double latitude_deg,
142
    double longitude_deg,
143
    double absolute_altitude_m,
144
    const ResultCallback callback)
145
{
146
    _impl->do_orbit_async(
×
147
        radius_m,
148
        velocity_ms,
149
        yaw_behavior,
150
        latitude_deg,
151
        longitude_deg,
152
        absolute_altitude_m,
153
        callback);
154
}
×
155

156
Action::Result Action::do_orbit(
×
157
    float radius_m,
158
    float velocity_ms,
159
    OrbitYawBehavior yaw_behavior,
160
    double latitude_deg,
161
    double longitude_deg,
162
    double absolute_altitude_m) const
163
{
164
    return _impl->do_orbit(
×
165
        radius_m, velocity_ms, yaw_behavior, latitude_deg, longitude_deg, absolute_altitude_m);
×
166
}
167

168
void Action::hold_async(const ResultCallback callback)
×
169
{
170
    _impl->hold_async(callback);
×
171
}
×
172

173
Action::Result Action::hold() const
×
174
{
175
    return _impl->hold();
×
176
}
177

178
void Action::set_actuator_async(int32_t index, float value, const ResultCallback callback)
×
179
{
180
    _impl->set_actuator_async(index, value, callback);
×
181
}
×
182

183
Action::Result Action::set_actuator(int32_t index, float value) const
×
184
{
185
    return _impl->set_actuator(index, value);
×
186
}
187

188
void Action::transition_to_fixedwing_async(const ResultCallback callback)
×
189
{
190
    _impl->transition_to_fixedwing_async(callback);
×
191
}
×
192

193
Action::Result Action::transition_to_fixedwing() const
×
194
{
195
    return _impl->transition_to_fixedwing();
×
196
}
197

198
void Action::transition_to_multicopter_async(const ResultCallback callback)
×
199
{
200
    _impl->transition_to_multicopter_async(callback);
×
201
}
×
202

203
Action::Result Action::transition_to_multicopter() const
×
204
{
205
    return _impl->transition_to_multicopter();
×
206
}
207

208
void Action::get_takeoff_altitude_async(const GetTakeoffAltitudeCallback callback)
×
209
{
210
    _impl->get_takeoff_altitude_async(callback);
×
211
}
×
212

213
std::pair<Action::Result, float> Action::get_takeoff_altitude() const
×
214
{
215
    return _impl->get_takeoff_altitude();
×
216
}
217

218
void Action::set_takeoff_altitude_async(float altitude, const ResultCallback callback)
×
219
{
220
    _impl->set_takeoff_altitude_async(altitude, callback);
×
221
}
×
222

223
Action::Result Action::set_takeoff_altitude(float altitude) const
×
224
{
225
    return _impl->set_takeoff_altitude(altitude);
×
226
}
227

228
void Action::get_return_to_launch_altitude_async(const GetReturnToLaunchAltitudeCallback callback)
×
229
{
230
    _impl->get_return_to_launch_altitude_async(callback);
×
231
}
×
232

233
std::pair<Action::Result, float> Action::get_return_to_launch_altitude() const
×
234
{
235
    return _impl->get_return_to_launch_altitude();
×
236
}
237

238
void Action::set_return_to_launch_altitude_async(
×
239
    float relative_altitude_m, const ResultCallback callback)
240
{
241
    _impl->set_return_to_launch_altitude_async(relative_altitude_m, callback);
×
242
}
×
243

244
Action::Result Action::set_return_to_launch_altitude(float relative_altitude_m) const
×
245
{
246
    return _impl->set_return_to_launch_altitude(relative_altitude_m);
×
247
}
248

249
void Action::set_current_speed_async(float speed_m_s, const ResultCallback callback)
×
250
{
251
    _impl->set_current_speed_async(speed_m_s, callback);
×
252
}
×
253

254
Action::Result Action::set_current_speed(float speed_m_s) const
×
255
{
256
    return _impl->set_current_speed(speed_m_s);
×
257
}
258

259
std::ostream& operator<<(std::ostream& str, Action::Result const& result)
×
260
{
261
    switch (result) {
×
262
        case Action::Result::Unknown:
×
263
            return str << "Unknown";
×
264
        case Action::Result::Success:
×
265
            return str << "Success";
×
266
        case Action::Result::NoSystem:
×
267
            return str << "No System";
×
268
        case Action::Result::ConnectionError:
×
269
            return str << "Connection Error";
×
270
        case Action::Result::Busy:
×
271
            return str << "Busy";
×
272
        case Action::Result::CommandDenied:
×
273
            return str << "Command Denied";
×
274
        case Action::Result::CommandDeniedLandedStateUnknown:
×
275
            return str << "Command Denied Landed State Unknown";
×
276
        case Action::Result::CommandDeniedNotLanded:
×
277
            return str << "Command Denied Not Landed";
×
278
        case Action::Result::Timeout:
×
279
            return str << "Timeout";
×
280
        case Action::Result::VtolTransitionSupportUnknown:
×
281
            return str << "Vtol Transition Support Unknown";
×
282
        case Action::Result::NoVtolTransitionSupport:
×
283
            return str << "No Vtol Transition Support";
×
284
        case Action::Result::ParameterError:
×
285
            return str << "Parameter Error";
×
286
        case Action::Result::Unsupported:
×
287
            return str << "Unsupported";
×
288
        case Action::Result::Failed:
×
289
            return str << "Failed";
×
290
        case Action::Result::InvalidArgument:
×
291
            return str << "Invalid Argument";
×
292
        default:
×
293
            return str << "Unknown";
×
294
    }
295
}
296

297
std::ostream& operator<<(std::ostream& str, Action::OrbitYawBehavior const& orbit_yaw_behavior)
×
298
{
299
    switch (orbit_yaw_behavior) {
×
300
        case Action::OrbitYawBehavior::HoldFrontToCircleCenter:
×
301
            return str << "Hold Front To Circle Center";
×
302
        case Action::OrbitYawBehavior::HoldInitialHeading:
×
303
            return str << "Hold Initial Heading";
×
304
        case Action::OrbitYawBehavior::Uncontrolled:
×
305
            return str << "Uncontrolled";
×
306
        case Action::OrbitYawBehavior::HoldFrontTangentToCircle:
×
307
            return str << "Hold Front Tangent To Circle";
×
308
        case Action::OrbitYawBehavior::RcControlled:
×
309
            return str << "Rc Controlled";
×
310
        default:
×
311
            return str << "Unknown";
×
312
    }
313
}
314

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