Use exit and arduino modules properly

This commit is contained in:
mmcwilliams 2019-02-26 21:54:04 -05:00
parent a9dd45a464
commit b19b20dad9
1 changed files with 3 additions and 2 deletions

View File

@ -16,7 +16,7 @@ const arduino = require('arduino')(cfg, ee)
const Mscript = require('mscript') const Mscript = require('mscript')
const mscript = new Mscript() const mscript = new Mscript()
const dev = require('device') const dev = require('device')(arduino)
let log let log
let readline let readline
@ -67,7 +67,8 @@ async function main (arg) {
} }
if (!devices ||devices.length > 1) { if (!devices ||devices.length > 1) {
return exit('No devices found', 1) //return exit('No devices found', 1)
devices = []
} }
await dev.all(devices) await dev.all(devices)