@aircast-4g/mavlink 1.1.6 → 1.1.8
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.
- package/README.md +261 -111
- package/dist/dialects/ardupilotmega/index.d.ts +1370 -1346
- package/dist/dialects/ardupilotmega/index.js +2355 -1608
- package/dist/dialects/ardupilotmega/index.js.map +1 -1
- package/dist/dialects/common/index.d.ts +1122 -1098
- package/dist/dialects/common/index.js +1941 -1284
- package/dist/dialects/common/index.js.map +1 -1
- package/dist/dialects/minimal/index.d.ts +39 -15
- package/dist/dialects/minimal/index.js +450 -20
- package/dist/dialects/minimal/index.js.map +1 -1
- package/dist/dialects/paparazzi/index.d.ts +1130 -1106
- package/dist/dialects/paparazzi/index.js +1955 -1293
- package/dist/dialects/paparazzi/index.js.map +1 -1
- package/dist/dialects/python_array_test/index.d.ts +1149 -1125
- package/dist/dialects/python_array_test/index.js +2005 -1340
- package/dist/dialects/python_array_test/index.js.map +1 -1
- package/dist/dialects/standard/index.d.ts +44 -20
- package/dist/dialects/standard/index.js +455 -25
- package/dist/dialects/standard/index.js.map +1 -1
- package/dist/dialects/test/index.d.ts +41 -17
- package/dist/dialects/test/index.js +460 -31
- package/dist/dialects/test/index.js.map +1 -1
- package/package.json +11 -3
|
@@ -5,7 +5,7 @@ interface ParsedMAVLinkMessage$1 {
|
|
|
5
5
|
message_id: number;
|
|
6
6
|
message_name: string;
|
|
7
7
|
sequence: number;
|
|
8
|
-
payload: Record<string,
|
|
8
|
+
payload: Record<string, unknown>;
|
|
9
9
|
protocol_version: 1 | 2;
|
|
10
10
|
checksum: number;
|
|
11
11
|
crc_ok: boolean;
|
|
@@ -262,26 +262,26 @@ declare enum MAV_COMPONENTEnum {
|
|
|
262
262
|
MAV_COMP_ID_SYSTEM_CONTROL = 250
|
|
263
263
|
}
|
|
264
264
|
type MAV_COMPONENT = MAV_COMPONENTEnum;
|
|
265
|
-
declare enum
|
|
266
|
-
|
|
267
|
-
|
|
265
|
+
declare enum MAV_BOOLEnum {
|
|
266
|
+
MAV_BOOL_FALSE = 0,
|
|
267
|
+
MAV_BOOL_TRUE = 1
|
|
268
268
|
}
|
|
269
|
-
type
|
|
269
|
+
type MAV_BOOL = MAV_BOOLEnum;
|
|
270
270
|
|
|
271
271
|
interface MessageHeartbeat {
|
|
272
272
|
type: MAV_TYPE;
|
|
273
273
|
autopilot: MAV_AUTOPILOT;
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
274
|
+
base_mode: MAV_MODE_FLAG;
|
|
275
|
+
custom_mode: number;
|
|
276
|
+
system_status: MAV_STATE;
|
|
277
|
+
mavlink_version: number;
|
|
278
278
|
}
|
|
279
279
|
interface MessageProtocolVersion {
|
|
280
280
|
version: number;
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
281
|
+
min_version: number;
|
|
282
|
+
max_version: number;
|
|
283
|
+
spec_version_hash: number[];
|
|
284
|
+
library_version_hash: number[];
|
|
285
285
|
}
|
|
286
286
|
interface MessageTypeMap {
|
|
287
287
|
HEARTBEAT: MessageHeartbeat;
|
|
@@ -302,7 +302,7 @@ interface ParsedMAVLinkMessage {
|
|
|
302
302
|
message_id: number;
|
|
303
303
|
message_name: string;
|
|
304
304
|
sequence: number;
|
|
305
|
-
payload: Record<string,
|
|
305
|
+
payload: Record<string, unknown>;
|
|
306
306
|
protocol_version: 1 | 2;
|
|
307
307
|
checksum: number;
|
|
308
308
|
crc_ok: boolean;
|
|
@@ -321,6 +321,8 @@ interface MAVLinkFrame {
|
|
|
321
321
|
payload: Uint8Array;
|
|
322
322
|
checksum: number;
|
|
323
323
|
signature?: Uint8Array;
|
|
324
|
+
crc_ok?: boolean;
|
|
325
|
+
protocol_version?: 1 | 2;
|
|
324
326
|
}
|
|
325
327
|
interface MessageDefinition {
|
|
326
328
|
id: number;
|
|
@@ -342,10 +344,7 @@ declare abstract class DialectParser {
|
|
|
342
344
|
parseBytes(data: Uint8Array): ParsedMAVLinkMessage[];
|
|
343
345
|
private tryParseFrame;
|
|
344
346
|
resetBuffer(): void;
|
|
345
|
-
decode(frame: MAVLinkFrame
|
|
346
|
-
crc_ok?: boolean;
|
|
347
|
-
protocol_version?: 1 | 2;
|
|
348
|
-
}): ParsedMAVLinkMessage;
|
|
347
|
+
decode(frame: MAVLinkFrame): ParsedMAVLinkMessage;
|
|
349
348
|
private decodePayload;
|
|
350
349
|
private getDefaultValue;
|
|
351
350
|
private decodeField;
|
|
@@ -354,12 +353,37 @@ declare abstract class DialectParser {
|
|
|
354
353
|
getSupportedMessageIds(): number[];
|
|
355
354
|
getDialectName(): string;
|
|
356
355
|
supportsMessage(messageId: number): boolean;
|
|
356
|
+
serializeMessage(message: Record<string, unknown> & {
|
|
357
|
+
message_name: string;
|
|
358
|
+
}): Uint8Array;
|
|
359
|
+
private extractMessageFields;
|
|
360
|
+
private completeMessageWithDefaults;
|
|
361
|
+
private getDefaultValueForField;
|
|
362
|
+
private serializePayload;
|
|
363
|
+
private serializeField;
|
|
364
|
+
private serializeSingleValue;
|
|
365
|
+
private getFieldSize;
|
|
366
|
+
private getSingleFieldSize;
|
|
367
|
+
private getDefaultValueForType;
|
|
368
|
+
private createMAVLinkFrame;
|
|
357
369
|
}
|
|
358
370
|
declare class StandardParser extends DialectParser {
|
|
359
371
|
constructor();
|
|
360
372
|
loadDefinitions(): Promise<void>;
|
|
361
373
|
private loadDefinitionsSync;
|
|
362
374
|
}
|
|
375
|
+
declare class StandardSerializer {
|
|
376
|
+
private parser;
|
|
377
|
+
constructor();
|
|
378
|
+
serialize(message: Record<string, unknown> & {
|
|
379
|
+
message_name: string;
|
|
380
|
+
}): Uint8Array;
|
|
381
|
+
completeMessage(message: Record<string, unknown> & {
|
|
382
|
+
message_name: string;
|
|
383
|
+
}): Record<string, unknown>;
|
|
384
|
+
getSupportedMessages(): string[];
|
|
385
|
+
supportsMessage(messageName: string): boolean;
|
|
386
|
+
}
|
|
363
387
|
|
|
364
|
-
export {
|
|
365
|
-
export type { AnyMessage,
|
|
388
|
+
export { MAV_AUTOPILOTEnum, MAV_BOOLEnum, MAV_COMPONENTEnum, MAV_MODE_FLAGEnum, MAV_MODE_FLAG_DECODE_POSITIONEnum, MAV_STATEEnum, MAV_TYPEEnum, StandardParser, StandardSerializer, isHeartbeat, isProtocolVersion };
|
|
389
|
+
export type { AnyMessage, MAV_AUTOPILOT, MAV_BOOL, MAV_COMPONENT, MAV_MODE_FLAG, MAV_MODE_FLAG_DECODE_POSITION, MAV_STATE, MAV_TYPE, MessageHeartbeat, MessageProtocolVersion, MessageTypeMap, ParsedMAVLinkMessage$1 as ParsedMAVLinkMessage };
|