Disable light on projector

This commit is contained in:
mmcwilliams 2019-03-13 15:28:07 -04:00
parent e47abeaaa5
commit cf6e4f9de9
1 changed files with 12 additions and 0 deletions

View File

@ -31,6 +31,11 @@ devices.profile = function (profile) {
for (let key of keys) {
mcopy.cfg[key] = keys[key]
}
if (typeof p.light !== 'undefined' && p.light === false) {
light.disable();
} else {
light.enable();
}
ipcRenderer.send('profile', { profile })
};
devices.listen = function () {
@ -45,6 +50,7 @@ devices.ready = function (event, arg) {
let opt;
let devs = [];
let notify = 'Connected to ';
let p;
gui.spinner(false);
gui.overlay(false);
for (let i in arg) {
@ -77,6 +83,12 @@ devices.ready = function (event, arg) {
if (arg && arg.profile) {
$('#profile').val(arg.profile)
log.info(`Using configuration profile "${arg.profile}"`, 'DEVICES', true, true);
p = mcopy.cfg.profiles[arg.profile];
if (typeof p.light !== 'undefined' && p.light === false) {
light.disable();
} else {
light.enable();
}
//devices.profile(arg.profile)
}
if (arg.projector_second) {