-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathMiniDrone_commands.xml
555 lines (503 loc) · 19 KB
/
MiniDrone_commands.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2014 Parrot SA
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Parrot nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-->
<!--
Important notes :
ALWAYS ADD NEW THINGS AT THE END OF THE PARENT TAG !
NEVER MODIFY EXISTING class/command/arg !
Comments are mandatory for all classes/commands/args
For each comment : 1st line will be used as brief (if applicable)
Other lines will be used as complete desc
How to add a new class :
<class name="MyNewClassName" > | No spaces ! [A-Za-z0-9_]
Comment about the class | Inlcuded in Doxygen doc
<cmd> ... </cmd> | List of commands
<cmd> ... </cmd>
</class>
How to add a new command (without args) to a class :
<cmd name="MyNewCommandName" > | No spaces ! [A-Za-z0-9_]
Comment about the command | Included in Doxygen doc
</cmd>
How to add a new command (with args primitive type) to a class :
<cmd name="MyNewCommandWithArgs" > | No spaces ! [A-Za-z0-9_]
Comment about the command | Included in Doxygen doc
<arg name="argName" type="argType" > | Repeat for each arg
Comment about the arg | argName must be a valid C variable name
</arg> | argType must be a valid type (see below)
... | Comment included in Doxygen doc
</cmd>
How to add a enum (in args) to a class :
<cmd name="MyNewCommandWithArgs" > | No spaces ! [A-Za-z0-9_]
Comment about the command | Included in Doxygen doc
<arg name="argName" type="argType" > | Repeat for each arg
Comment about the arg | Included in Doxygen doc
<enum name="argName"> | No spaces ! [A-Za-z0-9_]
Comment about the enum | Included in Doxygen doc
</enum>
</arg> | argType must be a valid type (see below)
... | Comment included in Doxygen doc
</cmd>
List of valid types (associated C type) :
- i8 / u8 : signed/unsigned 8 bit integer ([u]int8_t)
- i16 / u16 : signed/unsigned 16 bit integer ([u]int16_t)
- i32 / u32 : signed/unsigned 32 bit integer ([u]int32_t)
- i64 / u64 : signed/unsigned 64 bit integer ([u]int64_t)
- float : IEEE-754 single precision floating point number (float)
- double : IEEE-754 double precision floating point number (double)
- string : NULL-terminated UTF-8 String. (char *)
- enum: : enumeration define on arg
-->
<project name="minidrone" id="2">
All MiniDrone-only commands
<class name="Piloting" id="0">
All commands related to piloting the MiniDrone
<cmd name="FlatTrim" id="0">
Do a flat trim
</cmd>
<cmd name="TakeOff" id="1">
Ask the drone to take off
</cmd>
<cmd name="PCMD" id="2" buffer="NON_ACK">
Ask the drone to move around.
<arg name="flag" type="u8">
Boolean flag to activate roll/pitch movement
</arg>
<arg name="roll" type="i8">
Roll consign for the MiniDrone [-100;100]
</arg>
<arg name="pitch" type="i8">
Pitch consign for the MiniDrone [-100;100]
</arg>
<arg name="yaw" type="i8">
Yaw consign for the MiniDrone [-100;100]
</arg>
<arg name="gaz" type="i8">
Gaz consign for the MiniDrone [-100;100]
</arg>
<arg name="timestamp" type="u32">
Timestamp in miliseconds. Not an absolute time. (Typically 0 = time of connexion).
</arg>
</cmd>
<cmd name="Landing" id="3">
Ask the MiniDrone to land
</cmd>
<cmd name="Emergency" id="4" buffer="HIGH_PRIO" timeout="RETRY">
Put drone in emergency state
</cmd>
<cmd name="AutoTakeOffMode" id="5">
Set MiniDrone automatic take off mode
<arg name="state" type="u8">
State of automatic take off mode
</arg>
</cmd>
</class>
<class name="PilotingState" id="3">
Occasional information
<cmd name="FlatTrimChanged" id="0">
MiniDrone send flat trim was correctly processed
</cmd>
<cmd name="FlyingStateChanged" id="1">
Drone flying state changed
<arg name="state" type="enum">
Drone flying state
<enum name="landed">
Landed state
</enum>
<enum name="takingoff">
Taking off state
</enum>
<enum name="hovering">
Hovering state
</enum>
<enum name="flying">
Flying state
</enum>
<enum name="landing">
Landing state
</enum>
<enum name="emergency">
Emergency state
</enum>
<enum name="rolling">
Rolling state
</enum>
<enum name="init">
Initializing state (user should let the drone steady for a while)
</enum>
</arg>
</cmd>
<cmd name="AlertStateChanged" id="2">
Drone alert state changed
<arg name="state" type="enum">
Drone alert state
<enum name="none">
No alert
</enum>
<enum name="user">
User emergency alert
</enum>
<enum name="cut_out">
Cut out alert
</enum>
<enum name="critical_battery">
Critical battery alert
</enum>
<enum name="low_battery">
Low battery alert
</enum>
</arg>
</cmd>
<cmd name="AutoTakeOffModeChanged" id="3">
Set MiniDrone automatic take off mode
<arg name="state" type="u8">
State of automatic take off mode
</arg>
</cmd>
</class>
<class name="Animations" id="4">
Animation commands
<cmd name="Flip" id="0">
Make a flip
<arg name="direction" type="enum">
Direction for the flip
<enum name="front">
Flip direction front
</enum>
<enum name="back">
Flip direction back
</enum>
<enum name="right">
Flip direction right
</enum>
<enum name="left">
Flip direction left
</enum>
</arg>
</cmd>
<cmd name="Cap" id="1">
Change the product cap
<arg name="offset" type="i16">
Change the cap with offset angle [-180;180]
</arg>
</cmd>
</class>
<class name="MediaRecord" id="6">
Media recording management
<cmd name="Picture" id="0">
@deprecated
Take picture
<arg name="mass_storage_id" type="u8">
Mass storage id to take picture
</arg>
</cmd>
<cmd name="PictureV2" id="1">
Take picture
</cmd>
</class>
<class name="MediaRecordState" id="7">
State of media recording
<cmd name="PictureStateChanged" id="0">
@deprecated
State of picture recording
<arg name="state" type="u8">
1 if picture has been taken, 0 otherwise
</arg>
<arg name="mass_storage_id" type="u8">
Mass storage id to record
</arg>
</cmd>
<cmd name="PictureStateChangedV2" id="1">
State of device picture recording changed
<arg name="state" type="enum">
State of device picture recording
<enum name="ready">
The picture recording is ready
</enum>
<enum name="busy">
The picture recording is busy
</enum>
<enum name="notAvailable">
The picture recording is not available
</enum>
</arg>
<arg name="error" type="enum">
Error to explain the state
<enum name="ok">
No Error
</enum>
<enum name="unknown">
Unknown generic error
</enum>
<enum name="camera_ko">
Picture camera is out of order
</enum>
<enum name="memoryFull">
Memory full ; cannot save one additional picture
</enum>
<enum name="lowBattery">
Battery is too low to start/keep recording.
</enum>
</arg>
</cmd>
</class>
<class name="MediaRecordEvent" id="2">
Events of media recording
<cmd name="PictureEventChanged" id="0" notification="TRUE">
Event of picture recording
<arg name="event" type="enum">
Last event of picture recording
<enum name="taken">
Picture taken and saved
</enum>
<enum name="failed">
Picture failed
</enum>
</arg>
<arg name="error" type="enum">
Error to explain the event
<enum name="ok">
No Error
</enum>
<enum name="unknown">
Unknown generic error ; only when state is failed
</enum>
<enum name="busy">
Picture recording is busy ; only when state is failed
</enum>
<enum name="notAvailable">
Picture recording not available ; only when state is failed
</enum>
<enum name="memoryFull">
Memory full ; only when state is failed
</enum>
<enum name="lowBattery">
Battery is too low to record.
</enum>
</arg>
</cmd>
</class>
<class name="PilotingSettings" id="8">
Piloting Settings commands
<cmd name="MaxAltitude" id="0">
Set Max Altitude
<arg name="current" type="float">
Current altitude max in m
</arg>
</cmd>
<cmd name="MaxTilt" id="1">
Set Max Tilt
<arg name="current" type="float">
Current tilt max in degree
</arg>
</cmd>
</class>
<class name="PilotingSettingsState" id="9">
Piloting Settings state from product
<cmd name="MaxAltitudeChanged" id="0">
Max Altitude sent by product
<arg name="current" type="float">
Current altitude max
</arg>
<arg name="min" type="float">
Range min of altitude
</arg>
<arg name="max" type="float">
Range max of altitude
</arg>
</cmd>
<cmd name="MaxTiltChanged" id="1">
Max tilt sent by product
<arg name="current" type="float">
Current max tilt
</arg>
<arg name="min" type="float">
Range min of tilt
</arg>
<arg name="max" type="float">
Range max of tilt
</arg>
</cmd>
</class>
<class name="SpeedSettings" id="1">
Speed Settings commands
<cmd name="MaxVerticalSpeed" id="0">
Set Max Vertical speed
<arg name="current" type="float">
Current max vertical speed in m/s
</arg>
</cmd>
<cmd name="MaxRotationSpeed" id="1">
Set Max Rotation speed
<arg name="current" type="float">
Current max rotation speed in degree/s
</arg>
</cmd>
<cmd name="Wheels" id="2">
Presence of wheels
<arg name="present" type="u8">
1 if present, 0 if not present
</arg>
</cmd>
<cmd name="MaxHorizontalSpeed" id="3">
Set Max Horizontal speed (only used in case where PilotingSettings_MaxTilt is not used like in hydrofoil mode)
<arg name="current" type="float">
Current max Horizontal speed in m/s
</arg>
</cmd>
</class>
<class name="SpeedSettingsState" id="5">
Speed Settings state from product
<cmd name="MaxVerticalSpeedChanged" id="0">
Max vertical speed sent by product
<arg name="current" type="float">
Current max vertical speed in m/s
</arg>
<arg name="min" type="float">
Range min of vertical speed
</arg>
<arg name="max" type="float">
Range max of vertical speed
</arg>
</cmd>
<cmd name="MaxRotationSpeedChanged" id="1">
Max rotation speed sent by product
<arg name="current" type="float">
Current max rotation speed in degree/s
</arg>
<arg name="min" type="float">
Range min of rotation speed
</arg>
<arg name="max" type="float">
Range max of rotation speed
</arg>
</cmd>
<cmd name="WheelsChanged" id="2">
Presence of wheels sent by product
<arg name="present" type="u8">
1 if present, 0 if not present
</arg>
</cmd>
<cmd name="MaxHorizontalSpeedChanged" id="3">
Max horizontal speed sent by product (only used in case where PilotingSettings_MaxTilt is not used like in hydrofoil mode)
<arg name="current" type="float">
Current max horizontal speed in m/s
</arg>
<arg name="min" type="float">
Range min of horizontal speed
</arg>
<arg name="max" type="float">
Range max of horizontal speed
</arg>
</cmd>
</class>
<class name="Settings" id="10">
Settings commands
<cmd name="CutOutMode" id="0">
Set MiniDrone cut out mode
<arg name="enable" type="u8">
Enable cut out mode (1 if is activate, 0 otherwise)
</arg>
</cmd>
</class>
<class name="SettingsState" id="11">
Settings state from product
<cmd name="ProductMotorsVersionChanged" id="0">
@deprecated
Product Motors versions
<arg name="motor" type="u8">
Product Motor number [1 - 4]
</arg>
<arg name="type" type="string">
Product Motor type
</arg>
<arg name="software" type="string">
Product Motors software version
</arg>
<arg name="hardware" type="string">
Product Motors hardware version
</arg>
</cmd>
<cmd name="ProductInertialVersionChanged" id="1">
@deprecated
Product Inertial versions
<arg name="software" type="string">
Product Inertial software version
</arg>
<arg name="hardware" type="string">
Product Inertial hardware version
</arg>
</cmd>
<cmd name="CutOutModeChanged" id="2">
MiniDrone cut out mode
<arg name="enable" type="u8">
State of cut out mode (1 if is activate, 0 otherwise)
</arg>
</cmd>
</class>
<class name="FloodControlState" id="12">
Settings state from product
<cmd name="FloodControlChanged" id="0">
@deprecated
Flood control regulation
<arg name="delay" type="u16">
Delay (in ms) between two PCMD
</arg>
</cmd>
</class>
<class name="GPS" id="13">
GPS related commands
<cmd name="ControllerLatitudeForRun" id="0">
Set the controller latitude for a run.
<arg name="latitude" type="double">
Controller latitude in decimal degrees
</arg>
</cmd>
<cmd name="ControllerLongitudeForRun" id="1">
Set the controller longitude for a run.
<arg name="longitude" type="double">
Controller longitude in decimal degrees
</arg>
</cmd>
</class>
<class name="Configuration" id="14">
Configuration related commands
<cmd name="ControllerType" id="0">
Set the controller type.
<arg name="type" type="string">
Controller type like iOS or Android
</arg>
</cmd>
<cmd name="ControllerName" id="1">
Set the controller name.
<arg name="name" type="string">
Controller name like com.parrot.freeflight3
</arg>
</cmd>
</class>
</project>