Move devices into module

This commit is contained in:
Matt 2016-06-18 20:15:41 -04:00
parent 70e1c1c28e
commit 7313f415bf
2 changed files with 26 additions and 23 deletions

24
app/lib/devices-ui.js Normal file
View File

@ -0,0 +1,24 @@
var devices = {};
devices.init = function () {
'use strict';
devices.listen();
gui.overlay(true);
gui.spinner(true);
};
devices.listen = function () {
'use strict';
ipcRenderer.on('ready', function (event, arg) {
//console.log(arg.camera);
//console.log(arg.projector);
devices.ready();
return event.returnValue = true;
});
};
devices.ready = function () {
'use strict';
gui.spinner(false);
gui.overlay(false);
};
module.exports = devices;

View File

@ -10,11 +10,12 @@ var remote = require('remote'),
light = require('./lib/light-ui.js'), light = require('./lib/light-ui.js'),
proj = require('./lib/proj-ui.js'), proj = require('./lib/proj-ui.js'),
cam = require('./lib/cam-ui.js'), cam = require('./lib/cam-ui.js'),
nav = {}, nav = require('./lib/nav-ui.js'),
seq = require('./lib/seq-ui.js'), seq = require('./lib/seq-ui.js'),
cmd = require('./lib/cmd-ui.js'), cmd = require('./lib/cmd-ui.js'),
gui = require('./lib/gui.js'), gui = require('./lib/gui.js'),
log = require('./lib/log-ui.js'), log = require('./lib/log-ui.js'),
devices = require('./lib/devices-ui.js'),
mscript = require('./lib/mscript.js'); mscript = require('./lib/mscript.js');
//console.log(ipcRenderer.sendSync('light', { 'fuck' : true }) ); //console.log(ipcRenderer.sendSync('light', { 'fuck' : true }) );
@ -59,28 +60,6 @@ mcopy.state = {
//mcopy.gui.updateState(); //mcopy.gui.updateState();
var devices = {};
devices.init = function () {
'use strict';
devices.listen();
gui.overlay(true);
gui.spinner(true);
};
devices.listen = function () {
'use strict';
ipcRenderer.on('ready', function (event, arg) {
//console.log(arg.camera);
//console.log(arg.projector);
devices.ready();
return event.returnValue = true;
});
};
devices.ready = function () {
'use strict';
gui.spinner(false);
gui.overlay(false);
};
var init = function () { var init = function () {
'use strict'; 'use strict';
nav.init(); nav.init();