'use strict';
let devices;
class Devices {
constructor() {
this.id = 'devices';
}
init() {
this.listen();
this.profiles();
gui.overlay(true);
gui.spinner(true, 'Checking for connected devices...');
}
listen() {
ipcRenderer.on('ready', this.ready.bind(this));
ipcRenderer.on('intval', this.intvalCb.bind(this));
}
ready(event, arg) {
//console.dir(arg)
let opt;
let devs = [];
let notify = 'Connected to ';
let p;
try {
gui.spinner(false);
gui.overlay(false);
console.log('got here');
}
catch (err) {
console.error(err);
}
for (let i in arg) {
devs.push(arg[i].arduino);
if (arg[i].arduino && arg[i].arduino !== '/dev/fake') {
if (notify === 'Connected to ') {
notify += arg[i].arduino + ' ';
}
else {
notify += `& ${arg[i].arduino}`;
}
}
opt = $('