Open fcovas opened 10 years ago
If I run the examples/basic.js the application crashes because the serial port is not opened on the 'connected' event. Shouldn't the 'connected' event only be emitted after the SerialPort 'open' event?
examples/basic.js
'connected'
'open'
Here https://github.com/ecto/duino/blob/master/lib/board.js#L28, instead of:
self.emit('connected');
do this:
self.serial.on('open', function(){ self.emit('connected'); });
If I run the
examples/basic.js
the application crashes because the serial port is not opened on the'connected'
event. Shouldn't the'connected'
event only be emitted after the SerialPort'open'
event?Here https://github.com/ecto/duino/blob/master/lib/board.js#L28, instead of:
do this: