Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
rooi committed Oct 29, 2016
1 parent 96b5aed commit 8863efe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ module.exports = function(homebridge) {
this.log("serialPort.open");
if(this.serialPort.isOpen){
this.log("serialPort is already open...");
if(callback) callback(1);
if(callback) callback(0,1);
}
else{
this.serialPort.open(function (error) {
if(error) {
this.log("Error when opening serialport: " + error);
if(callback) callback(error);
if(callback) callback(0,error);
}
else {
if(callback) this.callbackQueue.push(callback);
Expand Down

0 comments on commit 8863efe

Please sign in to comment.