1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

bump serial port to 4.0.3 library

This commit is contained in:
Dave Conway-Jones 2016-10-13 14:12:08 +01:00
parent cebeab02f9
commit 36e834fdf1
3 changed files with 6 additions and 6 deletions

View File

@ -42,7 +42,6 @@
<p>The Arduino must be loaded with the Standard Firmata sketch available in the Arduino examples.</p> <p>The Arduino must be loaded with the Standard Firmata sketch available in the Arduino examples.</p>
<p>You can select either Digital or Analogue input. Outputs the value read as <code>msg.payload</code> and the pin number as <code>msg.topic</code>.</p> <p>You can select either Digital or Analogue input. Outputs the value read as <code>msg.payload</code> and the pin number as <code>msg.topic</code>.</p>
<p>It only outputs on a change of value - fine for digital inputs, but you can get a lot of data from analogue pins which you must then handle.</p> <p>It only outputs on a change of value - fine for digital inputs, but you can get a lot of data from analogue pins which you must then handle.</p>
<p>You can set the sample rate from 20 to 65535 mS.</p>
</script> </script>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -218,13 +218,14 @@ module.exports = function(RED) {
//newline = newline.replace("\\n","\n").replace("\\r","\r"); //newline = newline.replace("\\n","\n").replace("\\r","\r");
var olderr = ""; var olderr = "";
var setupSerial = function() { var setupSerial = function() {
obj.serial = new serialp.SerialPort(port,{ obj.serial = new serialp(port,{
baudrate: baud, baudrate: baud,
databits: databits, databits: databits,
parity: parity, parity: parity,
stopbits: stopbits, stopbits: stopbits,
parser: serialp.parsers.raw parser: serialp.parsers.raw,
},true, function(err, results) { autoOpen: true
}, function(err, results) {
if (err) { if (err) {
if (err.toString() !== olderr) { if (err.toString() !== olderr) {
olderr = err.toString(); olderr = err.toString();

View File

@ -1,9 +1,9 @@
{ {
"name" : "node-red-node-serialport", "name" : "node-red-node-serialport",
"version" : "0.3.0", "version" : "0.4.0",
"description" : "Node-RED nodes to talk to serial ports", "description" : "Node-RED nodes to talk to serial ports",
"dependencies" : { "dependencies" : {
"serialport" : "~3.1.2" "serialport" : "~4.0.3"
}, },
"repository" : { "repository" : {
"type":"git", "type":"git",