kelly / node-i2c

Node.js native bindings for i2c-dev. Plays well with Raspberry Pi and Beaglebone.
Other
216 stars 91 forks source link

Emit empty string instead of 1 to trigger repl #19

Closed jgable closed 10 years ago

jgable commented 10 years ago

Closes #12

Instead of emitting a 1, emit an empty string.

Tested on Raspberry Pi, Node 0.10.20.

kelly commented 10 years ago

Thanks!

danyocom commented 10 years ago

Any idea when/if this change is going to be published in the i2c version that is in the npmjs repository?

ActionNerd commented 9 years ago

Same question from me. I changed:

if @options.debug 
  require('repl').start(
    prompt: "i2c > " 
  ).context.wire = @ 
  process.stdin.emit 'data', 1 # trigger repl

To: if @options.debug require('repl').start( prompt: "i2c > " ).context.wire = @ process.stdin.emit 'data', '1' # trigger repl

And everything works great. Anything we can do to help?