2017-12-20 03:54:39 +00:00
|
|
|
|
2018-02-01 19:53:26 +00:00
|
|
|
const mcopy = {};
|
|
|
|
mcopy.cfg = require('./data/cfg.json');
|
|
|
|
|
|
|
|
|
|
|
|
const { remote, ipcRenderer } = require('electron');
|
|
|
|
const dialog = require('electron').remote.dialog;
|
|
|
|
const notifier = require('node-notifier');
|
|
|
|
const fs = require('fs');
|
|
|
|
const uuid = require('uuid');
|
|
|
|
const moment = require('moment');
|
|
|
|
const humanizeDuration = require('humanize-duration');
|
|
|
|
const gui = require('./lib/ui');
|
|
|
|
const light = require('./lib/ui/light.js');
|
|
|
|
const proj = require('./lib/ui/proj.js');
|
|
|
|
const cam = require('./lib/ui/cam.js');
|
|
|
|
const nav = require('./lib/ui/nav.js');
|
|
|
|
const seq = require('./lib/ui/seq.js');
|
|
|
|
const cmd = require('./lib/ui/cmd.js');
|
|
|
|
const log = require('./lib/ui/log.js');
|
|
|
|
const devices = require('./lib/ui/devices.js');
|
2018-03-05 04:55:31 +00:00
|
|
|
const mse = require('./lib/ui/mscript.js');
|
2018-02-01 19:53:26 +00:00
|
|
|
const mscript = require('./lib/mscript');
|
2017-12-20 03:54:39 +00:00
|
|
|
|
|
|
|
|
2016-04-13 00:53:28 +00:00
|
|
|
|
2016-04-14 04:17:42 +00:00
|
|
|
|
|
|
|
/******
|
|
|
|
State shared by ALL interfaces
|
|
|
|
*******/
|
|
|
|
mcopy.state = {
|
2016-04-17 21:55:23 +00:00
|
|
|
version : '2.0.0', //use for file compatibility check
|
2016-04-14 04:17:42 +00:00
|
|
|
camera : {
|
|
|
|
pos : 0,
|
|
|
|
direction: true
|
|
|
|
},
|
|
|
|
projector : {
|
|
|
|
pos : 0,
|
|
|
|
direction: true
|
|
|
|
},
|
|
|
|
sequence : {
|
|
|
|
size : 24,
|
|
|
|
arr : ['CF', 'PF'],
|
2016-04-17 21:55:23 +00:00
|
|
|
light : ['255,255,255', ''],
|
2016-04-14 04:17:42 +00:00
|
|
|
cmd : {
|
|
|
|
camera: mcopy.cfg.arduino.cmd.camera,
|
|
|
|
projector: mcopy.cfg.arduino.cmd.projector,
|
|
|
|
cam_direction: mcopy.cfg.arduino.cmd.cam_direction,
|
|
|
|
cam_direction: mcopy.cfg.arduino.cmd.proj_direction
|
|
|
|
},
|
|
|
|
pads: {
|
|
|
|
cam_forward: 'CF',
|
|
|
|
proj_forward : 'PF',
|
|
|
|
black_forward : 'BF',
|
|
|
|
|
|
|
|
cam_backward: 'CB',
|
|
|
|
proj_backward : 'PB',
|
2016-04-17 21:55:23 +00:00
|
|
|
black_backward : 'BB',
|
|
|
|
|
|
|
|
light_set : 'L'
|
2016-04-14 04:17:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-02-01 19:53:26 +00:00
|
|
|
function init () {
|
2016-04-13 07:26:35 +00:00
|
|
|
'use strict';
|
|
|
|
nav.init();
|
2016-04-18 02:22:18 +00:00
|
|
|
gui.grid.init();
|
2018-03-05 04:55:31 +00:00
|
|
|
mse.mscript.init();
|
|
|
|
mse.console.init();
|
2016-04-18 02:22:18 +00:00
|
|
|
log.init();
|
2016-04-19 03:44:51 +00:00
|
|
|
devices.init();
|
2016-04-13 04:06:19 +00:00
|
|
|
light.init();
|
2016-04-18 02:22:18 +00:00
|
|
|
proj.init();
|
2016-04-18 03:02:22 +00:00
|
|
|
cam.init();
|
2016-04-13 01:04:13 +00:00
|
|
|
};
|