mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Upgrade to latest underlying npm to support node8.x LTS
This commit is contained in:
parent
fce96ff196
commit
388ad11b72
@ -12,7 +12,7 @@
|
||||
|
||||
<script type="text/x-red" data-help-name="serial in">
|
||||
<p>Reads data from a local serial port.</p>
|
||||
<p>Can either <ul><li>wait for a "split" character (default \n). Also accepts hex notation (0x0a).</li>
|
||||
<p>Can either <ul><li>wait for a "split" character (default \n). Also accepts hex notation (0x0d).</li>
|
||||
<li>Wait for a timeout in milliseconds for the first character received</li>
|
||||
<li>Wait to fill a fixed sized buffer</li></ul></p>
|
||||
<p>It then outputs <code>msg.payload</code> as either a UTF8 ascii string or a binary Buffer object.</p>
|
||||
@ -154,6 +154,14 @@
|
||||
<div class="form-tips" id="tip-bin" hidden><span data-i18n="serial.tip.timeout"></span></div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="serial-port">
|
||||
<p>Provides configuration options for a serial port.</p>
|
||||
<p>The search button should return a list of available serial ports to choose from, or you
|
||||
can type in the location if known.</p>
|
||||
<p>The input can be split on a fixed character, after a timeout, or after a fixed number of characters.</p>
|
||||
<p>If using a character, it can be specified as either the character, the escaped shortcut (e.g. \n), or the hex code (e.g. 0x0d).</p>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
RED.nodes.registerType('serial-port',{
|
||||
category: 'config',
|
||||
|
@ -211,11 +211,11 @@ module.exports = function(RED) {
|
||||
var olderr = "";
|
||||
var setupSerial = function() {
|
||||
obj.serial = new serialp(port,{
|
||||
baudrate: baud,
|
||||
databits: databits,
|
||||
baudRate: baud,
|
||||
dataBits: databits,
|
||||
parity: parity,
|
||||
stopbits: stopbits,
|
||||
parser: serialp.parsers.raw,
|
||||
stopBits: stopbits,
|
||||
//parser: serialp.parsers.raw,
|
||||
autoOpen: true
|
||||
}, function(err, results) {
|
||||
if (err) {
|
||||
@ -256,9 +256,9 @@ module.exports = function(RED) {
|
||||
obj._emitter.emit('data',d[z]);
|
||||
}
|
||||
});
|
||||
obj.serial.on("disconnect",function() {
|
||||
RED.log.error(RED._("serial.errors.disconnected",{port:port}));
|
||||
});
|
||||
// obj.serial.on("disconnect",function() {
|
||||
// RED.log.error(RED._("serial.errors.disconnected",{port:port}));
|
||||
// });
|
||||
}
|
||||
setupSerial();
|
||||
return obj;
|
||||
|
@ -4,16 +4,11 @@ node-red-node-serialport
|
||||
<a href="http://nodered.org" target="_new">Node-RED</a> nodes to talk to
|
||||
hardware Serial ports.
|
||||
|
||||
**Note** : The version 0.1.x of this package requires underlying serialport
|
||||
v2.0.x
|
||||
|
||||
Earlier versions of node.js, as found on default Debian install on a Raspberry Pi, require an
|
||||
updated version of npm. See below. Or you can install the older version of
|
||||
this node - node-red-node-serialport@0.0.5
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
This node is usually installed by default in Node-RED so should not need to be installed manually.
|
||||
|
||||
Run the following command in your Node-RED user directory (typically `~/.node-red`):
|
||||
|
||||
npm i node-red-node-serialport
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name" : "node-red-node-serialport",
|
||||
"version" : "0.4.4",
|
||||
"version" : "0.6.0",
|
||||
"description" : "Node-RED nodes to talk to serial ports",
|
||||
"dependencies" : {
|
||||
"serialport" : "~4.0.7"
|
||||
"serialport" : "^6.0.4"
|
||||
},
|
||||
"repository" : {
|
||||
"type":"git",
|
||||
@ -12,7 +12,7 @@
|
||||
"license": "Apache-2.0",
|
||||
"keywords": [ "node-red", "serial" ],
|
||||
"node-red": {
|
||||
"version": ">=0.14.0",
|
||||
"version": ">=0.16.0",
|
||||
"nodes": {
|
||||
"serialport": "25-serial.js"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user