Added pin number to emit close event.

This commit is contained in:
Edgar O Silva 2013-11-11 14:33:36 -06:00
parent c47e3db26d
commit f71c24ff0a
2 changed files with 2 additions and 2 deletions

2
dist/digital-pin.js vendored
View File

@ -85,7 +85,7 @@
return this.self.emit('error', 'Error while closing pin files'); return this.self.emit('error', 'Error while closing pin files');
} else { } else {
console.log("PIN SHOULD BE UNEXPORTED"); console.log("PIN SHOULD BE UNEXPORTED");
return this.self.emit('close'); return this.self.emit('close', this.pinNum);
} }
}; };

View File

@ -63,7 +63,7 @@ namespace 'Cylon.IO', ->
@self.emit('error', 'Error while closing pin files') @self.emit('error', 'Error while closing pin files')
else else
console.log("PIN SHOULD BE UNEXPORTED") console.log("PIN SHOULD BE UNEXPORTED")
@self.emit('close') @self.emit('close', @pinNum)
digitalWrite: (value) -> digitalWrite: (value) ->
@self._setMode('w') unless @mode == 'w' @self._setMode('w') unless @mode == 'w'