serialport
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -0,1 +1,5 @@ | ||
Version 1.0.5 | ||
------------- | ||
- Added flush support. | ||
Version 1.0.4 | ||
@@ -2,0 +6,0 @@ ------------- |
{ | ||
"name": "serialport", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Welcome your robotic javascript overlords. Better yet, program them!", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -15,3 +15,3 @@ <pre> | ||
Version: 1.0.4 - Released August 13, 2012 - Now with Windows Support!!! | ||
Version: 1.0.5 - Released August 24, 2012 - Now with Windows Support!!! | ||
@@ -36,2 +36,8 @@ ***** | ||
For getting started with node-serialport, we recommend you begin with the following articles: | ||
* [Arduino Node Security Sensor Hacking](http://nexxylove.tumblr.com/post/20159263403/arduino-node-security-sensor-hacking) - A great all around "how do I use this" article. | ||
* [NodeBots - The Rise of JS Robotics](http://www.voodootikigod.com/nodebots-the-rise-of-js-robotics) - A survey article of why one would want to program robots in JS. | ||
* [Johnny-Five Getting Started Guide](https://github.com/rwldrn/johnny-five#setup-and-assemble-arduino) - Introduction to using the high level Johnny-Five library (awesome). | ||
How To Use | ||
@@ -90,3 +96,17 @@ ========== | ||
List Ports | ||
---------- | ||
You can also list the ports along with some metadata as well. | ||
<pre> | ||
serialport.list(function (err, ports) { | ||
ports.forEach(function(port) { | ||
console.log(port.comName); | ||
console.log(port.pnpId); | ||
console.log(port.manufacturer); | ||
}); | ||
}); | ||
</pre> | ||
Parsers | ||
@@ -93,0 +113,0 @@ ------- |
@@ -271,3 +271,25 @@ "use strict"; | ||
SerialPort.prototype.flush = function (callback) { | ||
var self = this; | ||
var fd = this.fd; | ||
if (!fd) { | ||
if (callback) { | ||
return callback(new Error("Serialport not open.")); | ||
} else { | ||
return; | ||
} | ||
} | ||
SerialPortBinding.flush(fd, function (err, result) { | ||
if (err) { | ||
self.emit('error', err); | ||
} | ||
if (callback) { | ||
callback(err, result); | ||
} | ||
}); | ||
}; | ||
module.exports.SerialPort = SerialPort; | ||
module.exports.parsers = parsers; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
210018
504
151