@aircast-4g/mavlink 1.1.3 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +40 -29
  2. package/dist/dialects/ardupilotmega/index.d.ts +7071 -5
  3. package/dist/dialects/ardupilotmega/index.js +17804 -0
  4. package/dist/dialects/ardupilotmega/index.js.map +1 -0
  5. package/dist/dialects/common/index.d.ts +5335 -5
  6. package/dist/dialects/common/index.js +13709 -0
  7. package/dist/dialects/common/index.js.map +1 -0
  8. package/dist/dialects/minimal/index.d.ts +359 -5
  9. package/dist/dialects/minimal/index.js +859 -0
  10. package/dist/dialects/minimal/index.js.map +1 -0
  11. package/dist/dialects/paparazzi/index.d.ts +5379 -0
  12. package/dist/dialects/paparazzi/index.js +13807 -0
  13. package/dist/dialects/paparazzi/index.js.map +1 -0
  14. package/dist/dialects/python_array_test/index.d.ts +5420 -0
  15. package/dist/dialects/python_array_test/index.js +13954 -0
  16. package/dist/dialects/python_array_test/index.js.map +1 -0
  17. package/dist/dialects/standard/index.d.ts +365 -0
  18. package/dist/dialects/standard/index.js +867 -0
  19. package/dist/dialects/standard/index.js.map +1 -0
  20. package/dist/dialects/test/index.d.ts +115 -0
  21. package/dist/dialects/test/index.js +409 -0
  22. package/dist/dialects/test/index.js.map +1 -0
  23. package/package.json +52 -18
  24. package/dist/cli.d.ts +0 -3
  25. package/dist/cli.d.ts.map +0 -1
  26. package/dist/cli.js +0 -174
  27. package/dist/cli.js.map +0 -1
  28. package/dist/dialects/ardupilotmega/decoder.js +0 -11930
  29. package/dist/dialects/ardupilotmega/enums.d.ts +0 -4631
  30. package/dist/dialects/ardupilotmega/messages.d.ts +0 -8088
  31. package/dist/dialects/ardupilotmega/types.d.ts +0 -2833
  32. package/dist/dialects/common/decoder.js +0 -9098
  33. package/dist/dialects/common/enums.d.ts +0 -3632
  34. package/dist/dialects/common/messages.d.ts +0 -6114
  35. package/dist/dialects/common/types.d.ts +0 -2159
  36. package/dist/dialects/minimal/decoder.js +0 -67
  37. package/dist/dialects/minimal/enums.d.ts +0 -494
  38. package/dist/dialects/minimal/messages.d.ts +0 -62
  39. package/dist/dialects/minimal/types.d.ts +0 -272
  40. package/dist/generator/batch-processor.d.ts +0 -17
  41. package/dist/generator/batch-processor.d.ts.map +0 -1
  42. package/dist/generator/batch-processor.js +0 -141
  43. package/dist/generator/batch-processor.js.map +0 -1
  44. package/dist/generator/generator.d.ts +0 -16
  45. package/dist/generator/generator.d.ts.map +0 -1
  46. package/dist/generator/generator.js +0 -136
  47. package/dist/generator/generator.js.map +0 -1
  48. package/dist/generator/template-engine.d.ts +0 -14
  49. package/dist/generator/template-engine.d.ts.map +0 -1
  50. package/dist/generator/template-engine.js +0 -270
  51. package/dist/generator/template-engine.js.map +0 -1
  52. package/dist/generator/type-converter.d.ts +0 -15
  53. package/dist/generator/type-converter.d.ts.map +0 -1
  54. package/dist/generator/type-converter.js +0 -179
  55. package/dist/generator/type-converter.js.map +0 -1
  56. package/dist/generator/xml-parser.d.ts +0 -13
  57. package/dist/generator/xml-parser.d.ts.map +0 -1
  58. package/dist/generator/xml-parser.js +0 -170
  59. package/dist/generator/xml-parser.js.map +0 -1
  60. package/dist/index.d.ts +0 -8
  61. package/dist/index.d.ts.map +0 -1
  62. package/dist/index.js +0 -37
  63. package/dist/index.js.map +0 -1
  64. package/dist/parser/crc.d.ts +0 -7
  65. package/dist/parser/crc.d.ts.map +0 -1
  66. package/dist/parser/crc.js +0 -182
  67. package/dist/parser/crc.js.map +0 -1
  68. package/dist/parser/frame-parser.d.ts +0 -15
  69. package/dist/parser/frame-parser.d.ts.map +0 -1
  70. package/dist/parser/frame-parser.js +0 -82
  71. package/dist/parser/frame-parser.js.map +0 -1
  72. package/dist/parser/index.d.ts +0 -6
  73. package/dist/parser/index.d.ts.map +0 -1
  74. package/dist/parser/index.js +0 -28
  75. package/dist/parser/index.js.map +0 -1
  76. package/dist/parser/mavlink-parser.d.ts +0 -35
  77. package/dist/parser/mavlink-parser.d.ts.map +0 -1
  78. package/dist/parser/mavlink-parser.js +0 -215
  79. package/dist/parser/mavlink-parser.js.map +0 -1
  80. package/dist/parser/message-decoder.d.ts +0 -47
  81. package/dist/parser/message-decoder.d.ts.map +0 -1
  82. package/dist/parser/message-decoder.js +0 -288
  83. package/dist/parser/message-decoder.js.map +0 -1
  84. package/dist/parser/types.d.ts +0 -60
  85. package/dist/parser/types.d.ts.map +0 -1
  86. package/dist/parser/types.js +0 -13
  87. package/dist/parser/types.js.map +0 -1
  88. package/dist/types.d.ts +0 -110
  89. package/dist/types.d.ts.map +0 -1
  90. package/dist/types.js +0 -3
  91. package/dist/types.js.map +0 -1
@@ -1,67 +0,0 @@
1
- // Auto-generated decoder definitions for minimal dialect
2
- // Generated from MAVLink XML definitions
3
-
4
- const MINIMAL_MESSAGE_DEFINITIONS = [
5
- {
6
- id: 0,
7
- name: 'HEARTBEAT',
8
- fields: [
9
- {
10
- name: 'type',
11
- type: 'uint8_t',
12
- },
13
- {
14
- name: 'autopilot',
15
- type: 'uint8_t',
16
- },
17
- {
18
- name: 'base_mode',
19
- type: 'uint8_t',
20
- },
21
- {
22
- name: 'custom_mode',
23
- type: 'uint32_t',
24
- },
25
- {
26
- name: 'system_status',
27
- type: 'uint8_t',
28
- },
29
- {
30
- name: 'mavlink_version',
31
- type: 'uint8_t_mavlink_version',
32
- },
33
- ]
34
- },
35
- {
36
- id: 300,
37
- name: 'PROTOCOL_VERSION',
38
- fields: [
39
- {
40
- name: 'version',
41
- type: 'uint16_t',
42
- },
43
- {
44
- name: 'min_version',
45
- type: 'uint16_t',
46
- },
47
- {
48
- name: 'max_version',
49
- type: 'uint16_t',
50
- },
51
- {
52
- name: 'spec_version_hash',
53
- type: 'uint8_t',
54
- arrayLength: 8,
55
- },
56
- {
57
- name: 'library_version_hash',
58
- type: 'uint8_t',
59
- arrayLength: 8,
60
- },
61
- ]
62
- },
63
- ];
64
-
65
- module.exports = {
66
- MINIMAL_MESSAGE_DEFINITIONS
67
- };
@@ -1,494 +0,0 @@
1
- // Auto-generated TypeScript enums for minimal dialect
2
-
3
- // Micro air vehicle / autopilot classes. This identifies the individual model.
4
- export enum MAV_AUTOPILOTEnum {
5
- // Generic autopilot, full support for everything
6
- MAV_AUTOPILOT_GENERIC = 0,
7
- // Reserved for future use.
8
- MAV_AUTOPILOT_RESERVED = 1,
9
- // SLUGS autopilot, http://slugsuav.soe.ucsc.edu
10
- MAV_AUTOPILOT_SLUGS = 2,
11
- // ArduPilot - Plane/Copter/Rover/Sub/Tracker, https://ardupilot.org
12
- MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
13
- // OpenPilot, http://openpilot.org
14
- MAV_AUTOPILOT_OPENPILOT = 4,
15
- // Generic autopilot only supporting simple waypoints
16
- MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
17
- // Generic autopilot supporting waypoints and other simple navigation commands
18
- MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
19
- // Generic autopilot supporting the full mission command set
20
- MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
21
- // No valid autopilot, e.g. a GCS or other MAVLink component
22
- MAV_AUTOPILOT_INVALID = 8,
23
- // PPZ UAV - http://nongnu.org/paparazzi
24
- MAV_AUTOPILOT_PPZ = 9,
25
- // UAV Dev Board
26
- MAV_AUTOPILOT_UDB = 10,
27
- // FlexiPilot
28
- MAV_AUTOPILOT_FP = 11,
29
- // PX4 Autopilot - http://px4.io/
30
- MAV_AUTOPILOT_PX4 = 12,
31
- // SMACCMPilot - http://smaccmpilot.org
32
- MAV_AUTOPILOT_SMACCMPILOT = 13,
33
- // AutoQuad -- http://autoquad.org
34
- MAV_AUTOPILOT_AUTOQUAD = 14,
35
- // Armazila -- http://armazila.com
36
- MAV_AUTOPILOT_ARMAZILA = 15,
37
- // Aerob -- http://aerob.ru
38
- MAV_AUTOPILOT_AEROB = 16,
39
- // ASLUAV autopilot -- http://www.asl.ethz.ch
40
- MAV_AUTOPILOT_ASLUAV = 17,
41
- // SmartAP Autopilot - http://sky-drones.com
42
- MAV_AUTOPILOT_SMARTAP = 18,
43
- // AirRails - http://uaventure.com
44
- MAV_AUTOPILOT_AIRRAILS = 19,
45
- // Fusion Reflex - https://fusion.engineering
46
- MAV_AUTOPILOT_REFLEX = 20,
47
- }
48
-
49
- // MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA).
50
- export enum MAV_TYPEEnum {
51
- // Generic micro air vehicle
52
- MAV_TYPE_GENERIC = 0,
53
- // Fixed wing aircraft.
54
- MAV_TYPE_FIXED_WING = 1,
55
- // Quadrotor
56
- MAV_TYPE_QUADROTOR = 2,
57
- // Coaxial helicopter
58
- MAV_TYPE_COAXIAL = 3,
59
- // Normal helicopter with tail rotor.
60
- MAV_TYPE_HELICOPTER = 4,
61
- // Ground installation
62
- MAV_TYPE_ANTENNA_TRACKER = 5,
63
- // Operator control unit / ground control station
64
- MAV_TYPE_GCS = 6,
65
- // Airship, controlled
66
- MAV_TYPE_AIRSHIP = 7,
67
- // Free balloon, uncontrolled
68
- MAV_TYPE_FREE_BALLOON = 8,
69
- // Rocket
70
- MAV_TYPE_ROCKET = 9,
71
- // Ground rover
72
- MAV_TYPE_GROUND_ROVER = 10,
73
- // Surface vessel, boat, ship
74
- MAV_TYPE_SURFACE_BOAT = 11,
75
- // Submarine
76
- MAV_TYPE_SUBMARINE = 12,
77
- // Hexarotor
78
- MAV_TYPE_HEXAROTOR = 13,
79
- // Octorotor
80
- MAV_TYPE_OCTOROTOR = 14,
81
- // Tricopter
82
- MAV_TYPE_TRICOPTER = 15,
83
- // Flapping wing
84
- MAV_TYPE_FLAPPING_WING = 16,
85
- // Kite
86
- MAV_TYPE_KITE = 17,
87
- // Onboard companion controller
88
- MAV_TYPE_ONBOARD_CONTROLLER = 18,
89
- // Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR.
90
- MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
91
- // Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR.
92
- MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
93
- // Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight.
94
- MAV_TYPE_VTOL_TILTROTOR = 21,
95
- // VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases.
96
- MAV_TYPE_VTOL_FIXEDROTOR = 22,
97
- // Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate.
98
- MAV_TYPE_VTOL_TAILSITTER = 23,
99
- // Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode.
100
- MAV_TYPE_VTOL_TILTWING = 24,
101
- // VTOL reserved 5
102
- MAV_TYPE_VTOL_RESERVED5 = 25,
103
- // Gimbal
104
- MAV_TYPE_GIMBAL = 26,
105
- // ADSB system
106
- MAV_TYPE_ADSB = 27,
107
- // Steerable, nonrigid airfoil
108
- MAV_TYPE_PARAFOIL = 28,
109
- // Dodecarotor
110
- MAV_TYPE_DODECAROTOR = 29,
111
- // Camera
112
- MAV_TYPE_CAMERA = 30,
113
- // Charging station
114
- MAV_TYPE_CHARGING_STATION = 31,
115
- // FLARM collision avoidance system
116
- MAV_TYPE_FLARM = 32,
117
- // Servo
118
- MAV_TYPE_SERVO = 33,
119
- // Open Drone ID. See https://mavlink.io/en/services/opendroneid.html.
120
- MAV_TYPE_ODID = 34,
121
- // Decarotor
122
- MAV_TYPE_DECAROTOR = 35,
123
- // Battery
124
- MAV_TYPE_BATTERY = 36,
125
- // Parachute
126
- MAV_TYPE_PARACHUTE = 37,
127
- // Log
128
- MAV_TYPE_LOG = 38,
129
- // OSD
130
- MAV_TYPE_OSD = 39,
131
- // IMU
132
- MAV_TYPE_IMU = 40,
133
- // GPS
134
- MAV_TYPE_GPS = 41,
135
- // Winch
136
- MAV_TYPE_WINCH = 42,
137
- // Generic multirotor that does not fit into a specific type or whose type is unknown
138
- MAV_TYPE_GENERIC_MULTIROTOR = 43,
139
- // Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light).
140
- MAV_TYPE_ILLUMINATOR = 44,
141
- // Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification.
142
- MAV_TYPE_SPACECRAFT_ORBITER = 45,
143
- // A generic four-legged ground vehicle (e.g., a robot dog).
144
- MAV_TYPE_GROUND_QUADRUPED = 46,
145
- // VTOL hybrid of helicopter and autogyro. It has a main rotor for lift and separate propellers for forward flight. The rotor must be powered for hover but can autorotate in cruise flight. See: https://en.wikipedia.org/wiki/Gyrodyne
146
- MAV_TYPE_VTOL_GYRODYNE = 47,
147
- // Gripper
148
- MAV_TYPE_GRIPPER = 48,
149
- }
150
-
151
- // These flags encode the MAV mode, see MAV_MODE enum for useful combinations.
152
- export enum MAV_MODE_FLAGEnum {
153
- // 0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state.
154
- MAV_MODE_FLAG_SAFETY_ARMED = 128,
155
- // 0b01000000 remote control input is enabled.
156
- MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64,
157
- // 0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational.
158
- MAV_MODE_FLAG_HIL_ENABLED = 32,
159
- // 0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around.
160
- MAV_MODE_FLAG_STABILIZE_ENABLED = 16,
161
- // 0b00001000 guided mode enabled, system flies waypoints / mission items.
162
- MAV_MODE_FLAG_GUIDED_ENABLED = 8,
163
- // 0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation.
164
- MAV_MODE_FLAG_AUTO_ENABLED = 4,
165
- // 0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations.
166
- MAV_MODE_FLAG_TEST_ENABLED = 2,
167
- // 0b00000001 system-specific custom mode is enabled. When using this flag to enable a custom mode all other flags should be ignored.
168
- MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1,
169
- }
170
-
171
- // These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not.
172
- export enum MAV_MODE_FLAG_DECODE_POSITIONEnum {
173
- // First bit: 10000000
174
- MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
175
- // Second bit: 01000000
176
- MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
177
- // Third bit: 00100000
178
- MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
179
- // Fourth bit: 00010000
180
- MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
181
- // Fifth bit: 00001000
182
- MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
183
- // Sixth bit: 00000100
184
- MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
185
- // Seventh bit: 00000010
186
- MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
187
- // Eighth bit: 00000001
188
- MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
189
- }
190
-
191
- export enum MAV_STATEEnum {
192
- // Uninitialized system, state is unknown.
193
- MAV_STATE_UNINIT = 0,
194
- // System is booting up.
195
- MAV_STATE_BOOT = 1,
196
- // System is calibrating and not flight-ready.
197
- MAV_STATE_CALIBRATING = 2,
198
- // System is grounded and on standby. It can be launched any time.
199
- MAV_STATE_STANDBY = 3,
200
- // System is active and might be already airborne. Motors are engaged.
201
- MAV_STATE_ACTIVE = 4,
202
- // System is in a non-normal flight mode (failsafe). It can however still navigate.
203
- MAV_STATE_CRITICAL = 5,
204
- // System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down.
205
- MAV_STATE_EMERGENCY = 6,
206
- // System just initialized its power-down sequence, will shut down now.
207
- MAV_STATE_POWEROFF = 7,
208
- // System is terminating itself (failsafe or commanded).
209
- MAV_STATE_FLIGHT_TERMINATION = 8,
210
- }
211
-
212
- // Legacy component ID values for particular types of hardware/software that might make up a MAVLink system (autopilot, cameras, servos, avoidance systems etc.).
213
- // Components are not required or expected to use IDs with names that correspond to their type or function, but may choose to do so.
214
- // Using an ID that matches the type may slightly reduce the chances of component id clashes, as, for historical reasons, it is less likely to be used by some other type of component.
215
- // System integration will still need to ensure that all components have unique IDs.
216
- // Component IDs are used for addressing messages to a particular component within a system.
217
- // A component can use any unique ID between 1 and 255 (MAV_COMP_ID_ALL value is the broadcast address, used to send to all components).
218
- // Historically component ID were also used for identifying the type of component.
219
- // New code must not use component IDs to infer the component type, but instead check the MAV_TYPE in the HEARTBEAT message!
220
- export enum MAV_COMPONENTEnum {
221
- // Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message.
222
- MAV_COMP_ID_ALL = 0,
223
- // System flight controller component ("autopilot"). Only one autopilot is expected in a particular system.
224
- MAV_COMP_ID_AUTOPILOT1 = 1,
225
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
226
- MAV_COMP_ID_USER1 = 25,
227
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
228
- MAV_COMP_ID_USER2 = 26,
229
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
230
- MAV_COMP_ID_USER3 = 27,
231
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
232
- MAV_COMP_ID_USER4 = 28,
233
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
234
- MAV_COMP_ID_USER5 = 29,
235
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
236
- MAV_COMP_ID_USER6 = 30,
237
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
238
- MAV_COMP_ID_USER7 = 31,
239
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
240
- MAV_COMP_ID_USER8 = 32,
241
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
242
- MAV_COMP_ID_USER9 = 33,
243
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
244
- MAV_COMP_ID_USER10 = 34,
245
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
246
- MAV_COMP_ID_USER11 = 35,
247
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
248
- MAV_COMP_ID_USER12 = 36,
249
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
250
- MAV_COMP_ID_USER13 = 37,
251
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
252
- MAV_COMP_ID_USER14 = 38,
253
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
254
- MAV_COMP_ID_USER15 = 39,
255
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
256
- MAV_COMP_ID_USER16 = 40,
257
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
258
- MAV_COMP_ID_USER17 = 41,
259
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
260
- MAV_COMP_ID_USER18 = 42,
261
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
262
- MAV_COMP_ID_USER19 = 43,
263
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
264
- MAV_COMP_ID_USER20 = 44,
265
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
266
- MAV_COMP_ID_USER21 = 45,
267
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
268
- MAV_COMP_ID_USER22 = 46,
269
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
270
- MAV_COMP_ID_USER23 = 47,
271
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
272
- MAV_COMP_ID_USER24 = 48,
273
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
274
- MAV_COMP_ID_USER25 = 49,
275
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
276
- MAV_COMP_ID_USER26 = 50,
277
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
278
- MAV_COMP_ID_USER27 = 51,
279
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
280
- MAV_COMP_ID_USER28 = 52,
281
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
282
- MAV_COMP_ID_USER29 = 53,
283
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
284
- MAV_COMP_ID_USER30 = 54,
285
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
286
- MAV_COMP_ID_USER31 = 55,
287
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
288
- MAV_COMP_ID_USER32 = 56,
289
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
290
- MAV_COMP_ID_USER33 = 57,
291
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
292
- MAV_COMP_ID_USER34 = 58,
293
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
294
- MAV_COMP_ID_USER35 = 59,
295
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
296
- MAV_COMP_ID_USER36 = 60,
297
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
298
- MAV_COMP_ID_USER37 = 61,
299
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
300
- MAV_COMP_ID_USER38 = 62,
301
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
302
- MAV_COMP_ID_USER39 = 63,
303
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
304
- MAV_COMP_ID_USER40 = 64,
305
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
306
- MAV_COMP_ID_USER41 = 65,
307
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
308
- MAV_COMP_ID_USER42 = 66,
309
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
310
- MAV_COMP_ID_USER43 = 67,
311
- // Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages).
312
- MAV_COMP_ID_TELEMETRY_RADIO = 68,
313
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
314
- MAV_COMP_ID_USER45 = 69,
315
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
316
- MAV_COMP_ID_USER46 = 70,
317
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
318
- MAV_COMP_ID_USER47 = 71,
319
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
320
- MAV_COMP_ID_USER48 = 72,
321
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
322
- MAV_COMP_ID_USER49 = 73,
323
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
324
- MAV_COMP_ID_USER50 = 74,
325
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
326
- MAV_COMP_ID_USER51 = 75,
327
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
328
- MAV_COMP_ID_USER52 = 76,
329
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
330
- MAV_COMP_ID_USER53 = 77,
331
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
332
- MAV_COMP_ID_USER54 = 78,
333
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
334
- MAV_COMP_ID_USER55 = 79,
335
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
336
- MAV_COMP_ID_USER56 = 80,
337
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
338
- MAV_COMP_ID_USER57 = 81,
339
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
340
- MAV_COMP_ID_USER58 = 82,
341
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
342
- MAV_COMP_ID_USER59 = 83,
343
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
344
- MAV_COMP_ID_USER60 = 84,
345
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
346
- MAV_COMP_ID_USER61 = 85,
347
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
348
- MAV_COMP_ID_USER62 = 86,
349
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
350
- MAV_COMP_ID_USER63 = 87,
351
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
352
- MAV_COMP_ID_USER64 = 88,
353
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
354
- MAV_COMP_ID_USER65 = 89,
355
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
356
- MAV_COMP_ID_USER66 = 90,
357
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
358
- MAV_COMP_ID_USER67 = 91,
359
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
360
- MAV_COMP_ID_USER68 = 92,
361
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
362
- MAV_COMP_ID_USER69 = 93,
363
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
364
- MAV_COMP_ID_USER70 = 94,
365
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
366
- MAV_COMP_ID_USER71 = 95,
367
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
368
- MAV_COMP_ID_USER72 = 96,
369
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
370
- MAV_COMP_ID_USER73 = 97,
371
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
372
- MAV_COMP_ID_USER74 = 98,
373
- // Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network.
374
- MAV_COMP_ID_USER75 = 99,
375
- // Camera #1.
376
- MAV_COMP_ID_CAMERA = 100,
377
- // Camera #2.
378
- MAV_COMP_ID_CAMERA2 = 101,
379
- // Camera #3.
380
- MAV_COMP_ID_CAMERA3 = 102,
381
- // Camera #4.
382
- MAV_COMP_ID_CAMERA4 = 103,
383
- // Camera #5.
384
- MAV_COMP_ID_CAMERA5 = 104,
385
- // Camera #6.
386
- MAV_COMP_ID_CAMERA6 = 105,
387
- // Servo #1.
388
- MAV_COMP_ID_SERVO1 = 140,
389
- // Servo #2.
390
- MAV_COMP_ID_SERVO2 = 141,
391
- // Servo #3.
392
- MAV_COMP_ID_SERVO3 = 142,
393
- // Servo #4.
394
- MAV_COMP_ID_SERVO4 = 143,
395
- // Servo #5.
396
- MAV_COMP_ID_SERVO5 = 144,
397
- // Servo #6.
398
- MAV_COMP_ID_SERVO6 = 145,
399
- // Servo #7.
400
- MAV_COMP_ID_SERVO7 = 146,
401
- // Servo #8.
402
- MAV_COMP_ID_SERVO8 = 147,
403
- // Servo #9.
404
- MAV_COMP_ID_SERVO9 = 148,
405
- // Servo #10.
406
- MAV_COMP_ID_SERVO10 = 149,
407
- // Servo #11.
408
- MAV_COMP_ID_SERVO11 = 150,
409
- // Servo #12.
410
- MAV_COMP_ID_SERVO12 = 151,
411
- // Servo #13.
412
- MAV_COMP_ID_SERVO13 = 152,
413
- // Servo #14.
414
- MAV_COMP_ID_SERVO14 = 153,
415
- // Gimbal #1.
416
- MAV_COMP_ID_GIMBAL = 154,
417
- // Logging component.
418
- MAV_COMP_ID_LOG = 155,
419
- // Automatic Dependent Surveillance-Broadcast (ADS-B) component.
420
- MAV_COMP_ID_ADSB = 156,
421
- // On Screen Display (OSD) devices for video links.
422
- MAV_COMP_ID_OSD = 157,
423
- // Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice.
424
- MAV_COMP_ID_PERIPHERAL = 158,
425
- // Gimbal ID for QX1.
426
- MAV_COMP_ID_QX1_GIMBAL = 159,
427
- // FLARM collision alert component.
428
- MAV_COMP_ID_FLARM = 160,
429
- // Parachute component.
430
- MAV_COMP_ID_PARACHUTE = 161,
431
- // Winch component.
432
- MAV_COMP_ID_WINCH = 169,
433
- // Gimbal #2.
434
- MAV_COMP_ID_GIMBAL2 = 171,
435
- // Gimbal #3.
436
- MAV_COMP_ID_GIMBAL3 = 172,
437
- // Gimbal #4
438
- MAV_COMP_ID_GIMBAL4 = 173,
439
- // Gimbal #5.
440
- MAV_COMP_ID_GIMBAL5 = 174,
441
- // Gimbal #6.
442
- MAV_COMP_ID_GIMBAL6 = 175,
443
- // Battery #1.
444
- MAV_COMP_ID_BATTERY = 180,
445
- // Battery #2.
446
- MAV_COMP_ID_BATTERY2 = 181,
447
- // CAN over MAVLink client.
448
- MAV_COMP_ID_MAVCAN = 189,
449
- // Component that can generate/supply a mission flight plan (e.g. GCS or developer API).
450
- MAV_COMP_ID_MISSIONPLANNER = 190,
451
- // Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on.
452
- MAV_COMP_ID_ONBOARD_COMPUTER = 191,
453
- // Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on.
454
- MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
455
- // Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on.
456
- MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
457
- // Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on.
458
- MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
459
- // Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.).
460
- MAV_COMP_ID_PATHPLANNER = 195,
461
- // Component that plans a collision free path between two points.
462
- MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
463
- // Component that provides position estimates using VIO techniques.
464
- MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
465
- // Component that manages pairing of vehicle and GCS.
466
- MAV_COMP_ID_PAIRING_MANAGER = 198,
467
- // Inertial Measurement Unit (IMU) #1.
468
- MAV_COMP_ID_IMU = 200,
469
- // Inertial Measurement Unit (IMU) #2.
470
- MAV_COMP_ID_IMU_2 = 201,
471
- // Inertial Measurement Unit (IMU) #3.
472
- MAV_COMP_ID_IMU_3 = 202,
473
- // GPS #1.
474
- MAV_COMP_ID_GPS = 220,
475
- // GPS #2.
476
- MAV_COMP_ID_GPS2 = 221,
477
- // Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet).
478
- MAV_COMP_ID_ODID_TXRX_1 = 236,
479
- // Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet).
480
- MAV_COMP_ID_ODID_TXRX_2 = 237,
481
- // Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet).
482
- MAV_COMP_ID_ODID_TXRX_3 = 238,
483
- // Component to bridge MAVLink to UDP (i.e. from a UART).
484
- MAV_COMP_ID_UDP_BRIDGE = 240,
485
- // Component to bridge to UART (i.e. from UDP).
486
- MAV_COMP_ID_UART_BRIDGE = 241,
487
- // Component handling TUNNEL messages (e.g. vendor specific GUI of a component).
488
- MAV_COMP_ID_TUNNEL_NODE = 242,
489
- // Illuminator
490
- MAV_COMP_ID_ILLUMINATOR = 243,
491
- // Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.).
492
- MAV_COMP_ID_SYSTEM_CONTROL = 250,
493
- }
494
-
@@ -1,62 +0,0 @@
1
- // Auto-generated TypeScript message interfaces for minimal dialect
2
-
3
- import { MAVLinkMessage } from './types';
4
- import type {
5
- MAV_AUTOPILOT,
6
- MAV_TYPE,
7
- MAV_MODE_FLAG,
8
- MAV_MODE_FLAG_DECODE_POSITION,
9
- MAV_STATE,
10
- MAV_COMPONENT,
11
- } from './types';
12
-
13
- // The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at https://mavlink.io/en/services/heartbeat.html
14
- export interface MessageHeartbeat {
15
- // Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type.
16
- Type: MAV_TYPE;
17
- // Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers.
18
- Autopilot: MAV_AUTOPILOT;
19
- // System mode bitmap.
20
- BaseMode: MAV_MODE_FLAG;
21
- // A bitfield for use for autopilot-specific flags
22
- CustomMode: number;
23
- // System status flag.
24
- SystemStatus: MAV_STATE;
25
- // MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version
26
- MavlinkVersion: number;
27
- }
28
-
29
- // Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly.
30
- export interface MessageProtocolVersion {
31
- // Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc.
32
- Version: number;
33
- // Minimum MAVLink version supported
34
- MinVersion: number;
35
- // Maximum MAVLink version supported (set to the same value as version by default)
36
- MaxVersion: number;
37
- // The first 8 bytes (not characters printed in hex!) of the git hash.
38
- SpecVersionHash: number[];
39
- // The first 8 bytes (not characters printed in hex!) of the git hash.
40
- LibraryVersionHash: number[];
41
- }
42
-
43
-
44
- // Message type map for type-safe message handling
45
- export interface MessageTypeMap {
46
- HEARTBEAT: MessageHeartbeat;
47
- PROTOCOL_VERSION: MessageProtocolVersion;
48
- }
49
-
50
- // Union type of all message types
51
- export type AnyMessage =
52
- | MAVLinkMessage<MessageHeartbeat>
53
- | MAVLinkMessage<MessageProtocolVersion>
54
- ;
55
-
56
- // Type guard functions
57
- export function isHeartbeat(msg: MAVLinkMessage): msg is MAVLinkMessage<MessageHeartbeat> {
58
- return msg.type === 'HEARTBEAT';
59
- }
60
- export function isProtocolVersion(msg: MAVLinkMessage): msg is MAVLinkMessage<MessageProtocolVersion> {
61
- return msg.type === 'PROTOCOL_VERSION';
62
- }