Distinguish devices with an empty array if there's an error listing devices OR if there are none found.
This commit is contained in:
parent
f554bd9659
commit
0d2fe71689
|
@ -40,13 +40,7 @@ mcopy.cfgStore = function () {
|
||||||
var enumerateDevices = function (err, devices) {
|
var enumerateDevices = function (err, devices) {
|
||||||
if (err) {
|
if (err) {
|
||||||
log.info(err, 'SERIAL', false, true)
|
log.info(err, 'SERIAL', false, true)
|
||||||
arduino.fakeConnect('projector', () => {
|
distinguishDevices([])
|
||||||
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')
|
|
||||||
} else {
|
} else {
|
||||||
log.info('Found ' + devices.length + ' USB devices', 'SERIAL', true, true)
|
log.info('Found ' + devices.length + ' USB devices', 'SERIAL', true, true)
|
||||||
distinguishDevices(devices)
|
distinguishDevices(devices)
|
||||||
|
|
Loading…
Reference in New Issue