Skip to content

Commit

Permalink
using serial port list from cuwire
Browse files Browse the repository at this point in the history
  • Loading branch information
apla committed Feb 1, 2015
1 parent cc441f3 commit cda05ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
15 changes: 6 additions & 9 deletions node/cuwireDomain.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,24 +208,21 @@
return;
}

if (!serialport)
return;

var err, result = [];
serialport.list(function (err, ports) {
ports.forEach(function(port) {
CuWireSerial.list (function (err, ports) {
if (err)
return cb(err);
ports.forEach (function (port) {
result.push ({
name: port.comName,
manufacturer: port.manufacturer,
vendorId: port.vendorId,
productId: port.productId,
serial: port.serial,
serialNumber: port.serialNumber,
connected: (port.comName in serialComms) ? true : false
});
// console.log(port.comName);
// console.log(port.pnpId);
// console.log(port.manufacturer);
});

cb (err, result);
});

Expand Down
2 changes: 1 addition & 1 deletion node/cuwireSerialBrackets.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var util = require ('util');

var CuwireSerial = require ('cuwire/console');
var CuwireSerial = require ('cuwire/serial');

function CuwireSerialBrackets (options) {
}
Expand Down
2 changes: 1 addition & 1 deletion node/node_modules/cuwire
Submodule cuwire updated 5 files
+2 −1 cli-options.json
+25 −9 cli.js
+5 −3 data.js
+5 −4 package.json
+51 −1 serial.js

0 comments on commit cda05ee

Please sign in to comment.