@canboat/canboatjs 2.5.6 → 2.6.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.
package/lib/canbus.js CHANGED
@@ -54,8 +54,6 @@ function CanbusStream (options) {
54
54
  this.options = options
55
55
  this.start()
56
56
 
57
- console.trace()
58
- console.log(options.app.ssetProviderStatus)
59
57
  this.setProviderStatus = options.app && options.app.setProviderStatus
60
58
  ? (msg) => {
61
59
  options.app.setProviderStatus(options.providerId, msg)
@@ -170,7 +168,8 @@ CanbusStream.prototype.connect = function() {
170
168
  this.lastDataReceived = Date.now()
171
169
  }
172
170
 
173
- if ( that.candevice && that.candevice.cansend && pgn.src == that.candevice.address ) {
171
+ //always send address claims through
172
+ if ( pgn.pgn != 60928 && that.candevice && that.candevice.cansend && pgn.src == that.candevice.address ) {
174
173
  return
175
174
  }
176
175
 
package/lib/candevice.js CHANGED
@@ -62,7 +62,7 @@ class CanDevice extends EventEmitter {
62
62
  "Model ID": "Signal K",
63
63
  "Software Version Code": "1.0",
64
64
  "Model Version": "canbusjs",
65
- "Model Serial Code": "123456",
65
+ "Model Serial Code": options.uniqueNumber ? options.uniqueNumber.toString() : "000001",
66
66
  "Certification Level": 0,
67
67
  "Load Equivalency": 1
68
68
  }
@@ -143,10 +143,7 @@ function handleISORequest(device, n2kMsg) {
143
143
  sendProductInformation(device)
144
144
  break;
145
145
  case 60928: // ISO address claim request
146
- //sendAddressClaim(device)
147
- let ac = JSON.parse(JSON.stringify(device.addressClaim))
148
- ac.dst = n2kMsg.src
149
- sendPGN(device, ac)
146
+ sendPGN(device, device.addressClaim)
150
147
  break;
151
148
  case 126464:
152
149
  sendPGNList(device)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canboat/canboatjs",
3
- "version": "2.5.6",
3
+ "version": "2.6.0",
4
4
  "description": "Native javascript version of canboat",
5
5
  "main": "index.js",
6
6
  "scripts": {