Distinguish devices with an empty array if there's an error listing devices OR if there are none found.

This commit is contained in:
mmcwilliams 2018-01-02 01:43:53 -05:00
parent f554bd9659
commit 0d2fe71689
1 changed files with 1 additions and 7 deletions

View File

@ -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)