From 0d2fe71689e1fb9130555224bd01dbeb63ac1f69 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Tue, 2 Jan 2018 01:43:53 -0500 Subject: [PATCH] Distinguish devices with an empty array if there's an error listing devices OR if there are none found. --- app/main.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/main.js b/app/main.js index e747dfb..2cae84b 100644 --- a/app/main.js +++ b/app/main.js @@ -40,13 +40,7 @@ mcopy.cfgStore = function () { var enumerateDevices = function (err, devices) { if (err) { log.info(err, 'SERIAL', false, true) - arduino.fakeConnect('projector', () => { - log.info('Connected to fake PROJECTOR device', 'SERIAL', true, true) - }) - arduino.fakeConnect('camera', () => { - log.info('Connected to fake CAMERA device', 'SERIAL', true, true) - }) - devicesReady('fake', 'fake') + distinguishDevices([]) } else { log.info('Found ' + devices.length + ' USB devices', 'SERIAL', true, true) distinguishDevices(devices)