signalk-vessels-to-ais 1.3.0 → 1.4.0

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 (3) hide show
  1. package/README.md +1 -0
  2. package/index.js +8 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -9,6 +9,7 @@ User can configure:
9
9
  - Own data can be added to AIS sending
10
10
 
11
11
  New:
12
+ - v1.4.0, add: Event output name to user configurable
12
13
  - v1.3.0, add: Navigational Status variations
13
14
  - v1.2.2, fix: if own position is not available
14
15
  - v1.2.1, fix: own vessel sending
package/index.js CHANGED
@@ -43,6 +43,7 @@ module.exports = function createPlugin(app) {
43
43
  const setStatus = app.setPluginStatus || app.setProviderStatus;
44
44
 
45
45
  let useTag;
46
+ let eventName
46
47
 
47
48
  const httpsAgent = new https.Agent({
48
49
  rejectUnauthorized: false,
@@ -52,6 +53,7 @@ module.exports = function createPlugin(app) {
52
53
 
53
54
  plugin.start = function (options) {
54
55
  useTag = options.useTag;
56
+ eventName = options.eventName;
55
57
 
56
58
  positionUpdate = options.position_update * 60;
57
59
  distance = options.distance;
@@ -149,7 +151,7 @@ module.exports = function createPlugin(app) {
149
151
  }
150
152
  if (sentence && sentence.length > 0) {
151
153
  app.debug(taggString + sentence);
152
- app.emit('nmea0183out', taggString + sentence);
154
+ app.emit(eventName, taggString + sentence);
153
155
  }
154
156
  }
155
157
 
@@ -444,6 +446,11 @@ module.exports = function createPlugin(app) {
444
446
  default: 100,
445
447
  title: 'AIS target within range [km]',
446
448
  },
449
+ eventName: {
450
+ type: 'string',
451
+ default: 'nmea0183out',
452
+ title: 'Output event name',
453
+ },
447
454
  },
448
455
  };
449
456
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-vessels-to-ais",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "SignalK server plugin to convert other vessel data to NMEA0183 AIS format and forward it out to 3rd party applications",
5
5
  "main": "index.js",
6
6
  "scripts": {