blendmicro
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -0,1 +1,5 @@ | ||
=== 0.2.1 2015-10-24 | ||
* bugfixed closing peripheral | ||
=== 0.2.0 2015-10-24 | ||
@@ -2,0 +6,0 @@ |
@@ -65,2 +65,7 @@ (function() { | ||
process.on(signal, function() { | ||
var ref1; | ||
if (_this.peripheral == null) { | ||
process.exit(1); | ||
return; | ||
} | ||
if (_this.peripheral.state === 'disconnected') { | ||
@@ -70,5 +75,7 @@ process.exit(1); | ||
} | ||
_this.peripheral.disconnect(function() { | ||
return process.exit(1); | ||
}); | ||
if ((ref1 = _this.peripheral) != null) { | ||
ref1.disconnect(function() { | ||
return process.exit(1); | ||
}); | ||
} | ||
return setTimeout(function() { | ||
@@ -134,3 +141,5 @@ debug('peripheral.disconnect timeout (2000 msec)'); | ||
return function() { | ||
callback(); | ||
if (typeof callback === "function") { | ||
callback(); | ||
} | ||
return _this.emit('close'); | ||
@@ -137,0 +146,0 @@ }; |
{ | ||
"name": "blendmicro", | ||
"private": false, | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "BlendMicro Node Lib", | ||
@@ -16,3 +16,2 @@ "main": "lib/blendmicro.js", | ||
"Arduino", | ||
"Firmata", | ||
"Bluetooth", | ||
@@ -19,0 +18,0 @@ "BLE", |
11703
153