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

mavlink / MAVSDK / 20967493006

13 Jan 2026 06:10PM UTC coverage: 48.034% (-0.03%) from 48.064%
20967493006

Pull #2750

github

web-flow
Merge 406dd1cb5 into 968fec296
Pull Request #2750: Add set_relay action support

0 of 22 new or added lines in 2 files covered. (0.0%)

81 existing lines in 4 files now uncovered.

17740 of 36932 relevant lines covered (48.03%)

462.9 hits per line

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

4.91
/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

NEW
188
Action::Result Action::set_relay(int32_t index, int32_t setting) const
×
189
{
NEW
190
    return _impl->set_relay(index, setting);
×
191
}
192

UNCOV
193
void Action::transition_to_fixedwing_async(const ResultCallback callback)
×
194
{
195
    _impl->transition_to_fixedwing_async(callback);
×
196
}
×
197

198
Action::Result Action::transition_to_fixedwing() const
×
199
{
200
    return _impl->transition_to_fixedwing();
×
201
}
202

203
void Action::transition_to_multicopter_async(const ResultCallback callback)
×
204
{
205
    _impl->transition_to_multicopter_async(callback);
×
206
}
×
207

208
Action::Result Action::transition_to_multicopter() const
×
209
{
210
    return _impl->transition_to_multicopter();
×
211
}
212

213
void Action::get_takeoff_altitude_async(const GetTakeoffAltitudeCallback callback)
×
214
{
215
    _impl->get_takeoff_altitude_async(callback);
×
216
}
×
217

218
std::pair<Action::Result, float> Action::get_takeoff_altitude() const
×
219
{
220
    return _impl->get_takeoff_altitude();
×
221
}
222

223
void Action::set_takeoff_altitude_async(float altitude, const ResultCallback callback)
×
224
{
225
    _impl->set_takeoff_altitude_async(altitude, callback);
×
226
}
×
227

228
Action::Result Action::set_takeoff_altitude(float altitude) const
×
229
{
230
    return _impl->set_takeoff_altitude(altitude);
×
231
}
232

233
void Action::get_return_to_launch_altitude_async(const GetReturnToLaunchAltitudeCallback callback)
×
234
{
235
    _impl->get_return_to_launch_altitude_async(callback);
×
236
}
×
237

238
std::pair<Action::Result, float> Action::get_return_to_launch_altitude() const
×
239
{
240
    return _impl->get_return_to_launch_altitude();
×
241
}
242

243
void Action::set_return_to_launch_altitude_async(
×
244
    float relative_altitude_m, const ResultCallback callback)
245
{
246
    _impl->set_return_to_launch_altitude_async(relative_altitude_m, callback);
×
247
}
×
248

249
Action::Result Action::set_return_to_launch_altitude(float relative_altitude_m) const
×
250
{
251
    return _impl->set_return_to_launch_altitude(relative_altitude_m);
×
252
}
253

254
void Action::set_current_speed_async(float speed_m_s, const ResultCallback callback)
×
255
{
256
    _impl->set_current_speed_async(speed_m_s, callback);
×
257
}
×
258

259
Action::Result Action::set_current_speed(float speed_m_s) const
×
260
{
261
    return _impl->set_current_speed(speed_m_s);
×
262
}
263

264
Action::Result Action::set_gps_global_origin(
×
265
    double latitude_deg, double longitude_deg, float absolute_altitude_m) const
266
{
267
    return _impl->set_gps_global_origin(latitude_deg, longitude_deg, absolute_altitude_m);
×
268
}
269

270
std::ostream& operator<<(std::ostream& str, Action::Result const& result)
×
271
{
272
    switch (result) {
×
273
        case Action::Result::Unknown:
×
274
            return str << "Unknown";
×
275
        case Action::Result::Success:
×
276
            return str << "Success";
×
277
        case Action::Result::NoSystem:
×
278
            return str << "No System";
×
279
        case Action::Result::ConnectionError:
×
280
            return str << "Connection Error";
×
281
        case Action::Result::Busy:
×
282
            return str << "Busy";
×
283
        case Action::Result::CommandDenied:
×
284
            return str << "Command Denied";
×
285
        case Action::Result::CommandDeniedLandedStateUnknown:
×
286
            return str << "Command Denied Landed State Unknown";
×
287
        case Action::Result::CommandDeniedNotLanded:
×
288
            return str << "Command Denied Not Landed";
×
289
        case Action::Result::Timeout:
×
290
            return str << "Timeout";
×
291
        case Action::Result::VtolTransitionSupportUnknown:
×
292
            return str << "Vtol Transition Support Unknown";
×
293
        case Action::Result::NoVtolTransitionSupport:
×
294
            return str << "No Vtol Transition Support";
×
295
        case Action::Result::ParameterError:
×
296
            return str << "Parameter Error";
×
297
        case Action::Result::Unsupported:
×
298
            return str << "Unsupported";
×
299
        case Action::Result::Failed:
×
300
            return str << "Failed";
×
301
        case Action::Result::InvalidArgument:
×
302
            return str << "Invalid Argument";
×
303
        default:
×
304
            return str << "Unknown";
×
305
    }
306
}
307

308
std::ostream& operator<<(std::ostream& str, Action::OrbitYawBehavior const& orbit_yaw_behavior)
×
309
{
310
    switch (orbit_yaw_behavior) {
×
311
        case Action::OrbitYawBehavior::HoldFrontToCircleCenter:
×
312
            return str << "Hold Front To Circle Center";
×
313
        case Action::OrbitYawBehavior::HoldInitialHeading:
×
314
            return str << "Hold Initial Heading";
×
315
        case Action::OrbitYawBehavior::Uncontrolled:
×
316
            return str << "Uncontrolled";
×
317
        case Action::OrbitYawBehavior::HoldFrontTangentToCircle:
×
318
            return str << "Hold Front Tangent To Circle";
×
319
        case Action::OrbitYawBehavior::RcControlled:
×
320
            return str << "Rc Controlled";
×
321
        default:
×
322
            return str << "Unknown";
×
323
    }
324
}
325

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