diff --git a/dist/digital-pin.js b/dist/digital-pin.js index 9bdfb8d..a0dddcd 100644 --- a/dist/digital-pin.js +++ b/dist/digital-pin.js @@ -85,7 +85,7 @@ return this.self.emit('error', 'Error while closing pin files'); } else { console.log("PIN SHOULD BE UNEXPORTED"); - return this.self.emit('close'); + return this.self.emit('close', this.pinNum); } }; diff --git a/src/digital-pin.coffee b/src/digital-pin.coffee index bdd8c44..8488881 100644 --- a/src/digital-pin.coffee +++ b/src/digital-pin.coffee @@ -63,7 +63,7 @@ namespace 'Cylon.IO', -> @self.emit('error', 'Error while closing pin files') else console.log("PIN SHOULD BE UNEXPORTED") - @self.emit('close') + @self.emit('close', @pinNum) digitalWrite: (value) -> @self._setMode('w') unless @mode == 'w'