node-mavlink 2.0.4 → 2.0.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.
- package/README.md +1 -1
- package/dist/lib/mavesp.d.ts +2 -1
- package/dist/lib/mavesp.d.ts.map +1 -1
- package/dist/lib/mavesp.js +3 -1
- package/dist/lib/mavlink.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
@@ -265,7 +265,7 @@ The last step is quite easy:
|
|
265
265
|
```javascript
|
266
266
|
import { registerCustomMessageMagicNumber } from 'node-mavlink'
|
267
267
|
|
268
|
-
registerCustomMessageMagicNumber('999999'
|
268
|
+
registerCustomMessageMagicNumber('999999', 42)
|
269
269
|
```
|
270
270
|
|
271
271
|
From now on the splitter will know how to properly calculate CRC for your packages and you're all good.
|
package/dist/lib/mavesp.d.ts
CHANGED
@@ -30,8 +30,9 @@ export declare class MavEsp8266 extends EventEmitter {
|
|
30
30
|
*
|
31
31
|
* @param receivePort port to receive messages on (default: 14550)
|
32
32
|
* @param sendPort port to send messages to (default: 14555)
|
33
|
+
* @param ip IP address to send to in case there is no broadcast (default: empty string)
|
33
34
|
*/
|
34
|
-
start(receivePort?: number, sendPort?: number): Promise<ConnectionInfo>;
|
35
|
+
start(receivePort?: number, sendPort?: number, ip?: string): Promise<ConnectionInfo>;
|
35
36
|
/**
|
36
37
|
* Closes the client stopping any message handlers
|
37
38
|
*/
|
package/dist/lib/mavesp.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mavesp.d.ts","sourceRoot":"","sources":["../../lib/mavesp.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAIrC,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAA0B,MAAM,WAAW,CAAA;AAG9F,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEvD,MAAM,WAAW,cAAc;IAC7B,EAAE,EA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AAG,EAAE,WAAW,EAAE,KAAK,GAAE,OAAgC,EAAE,MAAM,GAAE,OAAiC,GAAG,OAAO,CAAC,MAAM,CAAC;IAOjI;;;;;;;OAOG;IACG,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,OAAW,EAAE,KAAK,GAAE,OAAgC,EAAE,MAAM,GAAE,OAAiC,GAAG,OAAO,CAAC,MAAM,CAAC;IAQzK;;;;OAIG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IASjD,OAAO,CAAC,sBAAsB;IAO9B,OAAO,CAAC,qBAAqB;CAI9B"}
|
package/dist/lib/mavesp.js
CHANGED
@@ -37,9 +37,11 @@ class MavEsp8266 extends events_1.EventEmitter {
|
|
37
37
|
*
|
38
38
|
* @param receivePort port to receive messages on (default: 14550)
|
39
39
|
* @param sendPort port to send messages to (default: 14555)
|
40
|
+
* @param ip IP address to send to in case there is no broadcast (default: empty string)
|
40
41
|
*/
|
41
|
-
async start(receivePort = 14550, sendPort = 14555) {
|
42
|
+
async start(receivePort = 14550, sendPort = 14555, ip = '') {
|
42
43
|
this.sendPort = sendPort;
|
44
|
+
this.ip = ip;
|
43
45
|
// Create a UDP socket
|
44
46
|
this.socket = (0, dgram_1.createSocket)({ type: 'udp4', reuseAddr: true });
|
45
47
|
this.socket.on('message', this.processIncomingUDPData);
|
package/dist/lib/mavlink.js
CHANGED
@@ -529,7 +529,7 @@ class MavLinkPacketSplitter extends stream_1.Transform {
|
|
529
529
|
const protocol = new Protocol();
|
530
530
|
const header = protocol.header(buffer);
|
531
531
|
const magic = this.magicNumbers[header.msgid];
|
532
|
-
if (magic) {
|
532
|
+
if (magic !== null && magic !== undefined) {
|
533
533
|
const crc = protocol.crc(buffer);
|
534
534
|
const trim = this.isV2Signed(buffer)
|
535
535
|
? MavLinkPacketSignature.SIGNATURE_LENGTH + MavLinkProtocol.CHECKSUM_LENGTH
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "node-mavlink",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.6",
|
4
4
|
"author": "Matthias Hryniszak <padcom@gmail.com>",
|
5
5
|
"license": "LGPL",
|
6
6
|
"description": "MavLink definitions and parsing library",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"main": "dist/index.js",
|
23
23
|
"types": "dist/index.d.ts",
|
24
24
|
"dependencies": {
|
25
|
-
"mavlink-mappings": "^1.0.18-20230330-
|
25
|
+
"mavlink-mappings": "^1.0.18-20230330-2"
|
26
26
|
},
|
27
27
|
"scripts": {
|
28
28
|
"clean": "rm -rf dist lib/*.js",
|