diff --git a/node/cuwireDomain.js b/node/cuwireDomain.js index d97ae71..3d2bf13 100644 --- a/node/cuwireDomain.js +++ b/node/cuwireDomain.js @@ -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); }); diff --git a/node/cuwireSerialBrackets.js b/node/cuwireSerialBrackets.js index e539aa1..3957a8e 100644 --- a/node/cuwireSerialBrackets.js +++ b/node/cuwireSerialBrackets.js @@ -1,6 +1,6 @@ var util = require ('util'); -var CuwireSerial = require ('cuwire/console'); +var CuwireSerial = require ('cuwire/serial'); function CuwireSerialBrackets (options) { } diff --git a/node/node_modules/cuwire b/node/node_modules/cuwire index 4698715..d282287 160000 --- a/node/node_modules/cuwire +++ b/node/node_modules/cuwire @@ -1 +1 @@ -Subproject commit 4698715461aad095ef2e510b50dad071e78f8491 +Subproject commit d28228779fbae2ef5b99c3ce6dbf62237c234ad2