Bump arduino node to latest firmata and serialport

shoudl work better with nodejs 10
This commit is contained in:
Dave Conway-Jones 2019-02-12 22:44:21 +00:00
parent 602586ad82
commit c1650b5d47
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
3 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@ module.exports = function(RED) {
this.device = n.device || null;
var node = this;
node.board = Board(node.device, function(e) {
node.board = new Board(node.device, function(e) {
//console.log("ERR",e);
if ((e !== undefined) && (e.toString().indexOf("cannot open") !== -1) ) {
node.error(RED._("arduino.errors.portnotfound",{device:node.device}));
@ -32,7 +32,7 @@ module.exports = function(RED) {
node.on('close', function(done) {
if (node.board) {
try {
node.board.sp.close(function() {
node.board.transport.close(function() {
if (RED.settings.verbose) { node.log(RED._("arduino.status.portclosed")); }
done();
});
@ -172,6 +172,5 @@ module.exports = function(RED) {
SP.list(function(error, ports) {
res.json(ports);
});
});
}

View File

@ -7,7 +7,7 @@ Arduino running standard firmata 2.2 or better.
Install
-------
Run the following command in your Node-RED user directory - typically `~/.node-red`
Either use the Menu - Manage Palette option or run the following command in your Node-RED user directory - typically `~/.node-red`
npm i --unsafe-perm node-red-node-arduino

View File

@ -1,9 +1,9 @@
{
"name" : "node-red-node-arduino",
"version" : "0.0.18",
"version" : "0.1.0",
"description" : "A Node-RED node to talk to an Arduino running firmata",
"dependencies" : {
"firmata" : "~0.19.1"
"firmata" : "^2.0.0"
},
"repository" : {
"type":"git",
@ -16,6 +16,7 @@
"arduino": "35-arduino.js"
}
},
"engines" : { "node" : ">=8" },
"author": {
"name": "Dave Conway-Jones",
"email": "ceejay@vnet.ibm.com",