remove logging and commented code

This commit is contained in:
2023-01-09 09:11:52 -06:00
parent 5ccb3c0828
commit 0d235b5c61
7 changed files with 1 additions and 23 deletions
-1
View File
@@ -7,7 +7,6 @@ window.init = function init() {
for (let i = 0; i < Object.keys(networkInterfaces).length; i++) {
const interfaceID = Object.keys(networkInterfaces)[i];
const interfaceObj = networkInterfaces[interfaceID];
console.log(interfaceObj);
html += `<tr><td><span class="if-${interfaceID.substring(0, 2)}">${interfaceID}</span></td>`;
html += `<td>${interfaceObj[0].address}</td>`;
-1
View File
@@ -287,7 +287,6 @@ exports.data = function data(_device, oscData) {
} else if (match(oscAddressParts, ['update', 'workspace', '*', 'dashboard'])) {
// this workspace might be new, let's check
if (device.data.workspaces[oscAddressParts[2]] === undefined) {
console.log('new workspace!');
device.send('/workspaces');
}
} else if (match(oscAddressParts, ['update', 'workspace', '*', 'cueList', '*', 'playbackPosition'])) {
-2
View File
@@ -26,7 +26,6 @@ exports.ready = function ready(device) {
const networkInterfaces = d.getNetworkInterfaces();
// device.draw();
for (let i = 1; i <= 16; i++) {
for (let j = 0; j < Object.keys(networkInterfaces).length; j++) {
const networkInterfaceID = Object.keys(networkInterfaces)[j];
@@ -117,7 +116,6 @@ exports.update = function update(_device, doc, updateType, updateData) {
$code.textContent = 'RDM';
}
} else {
// console.log('x');
device.draw();
device.update('elementCache');
}
-4
View File
@@ -29,10 +29,6 @@ exports.ready = function ready(device) {
d.data.stereoMute = 0;
d.send('/xinfo');
// device.send(Buffer.from("\x2f\x62\x61\x74\x63\x68\x73\x75\x62\x73\x63\x72\x69\x62\x65\x00\x2c\x73\x73\x69\x69\x69\x00\x00\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x2f\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"));
// device.send(Buffer.from("/batchsubscribe\x00,ssiii\x00\x00meters/0\x00\x00\x00\x00/meters/0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"));
// device.send(Buffer.from("/subscribe\x00,si\x00/-stat/solosw/01\x001"));
};
function parseAddress(msg) {
-5
View File
@@ -27,8 +27,6 @@ function registerDevice(newDevice, discoveryMethod) {
return false;
}
// console.log("Registered new "+newDevice.type)
const id = newDevice.id || uuid();
devices[id] = {
id,
@@ -195,7 +193,6 @@ function initDeviceConnection(id) {
device.send = (data) => {};
}
// device.plugin = plugins[type];
return true;
}
@@ -233,7 +230,6 @@ module.exports.changeActiveType = function changeActiveType(newType) {
initDeviceConnection(device.id);
VIEW.draw(device);
VIEW.updateFields();
// SAVESLOTS.saveAll();
};
module.exports.changeActiveIP = function changeActiveIP(newIP) {
@@ -269,7 +265,6 @@ module.exports.changeActivePinIndex = function changeActivePinIndex(newPin) {
module.exports.changePinIndex = function changePinIndex(device, newPin) {
const d = device;
d.pinIndex = newPin;
// SAVESLOTS.saveAll();
};
module.exports.refreshActive = function refreshActive() {
const device = VIEW.getActiveDevice();
-1
View File
@@ -25,7 +25,6 @@ if (storedDevices) {
function loadSlot(slotIndex) {
VIEW.toggleSlotButtons(slotIndex);
activeSlot = slotIndex;
console.log(DEVICE.all);
Object.keys(DEVICE.all).forEach((d) => {
DEVICE.changePinIndex(DEVICE.all[d], false);
+1 -9
View File
@@ -2,7 +2,6 @@ const { ipcRenderer } = require('electron');
const DEVICE = require('./device.js');
const PLUGINS = require('./plugins.js');
const { saveAll } = require('./saveSlots.js');
// const _ = require('lodash/function');
const pinnedDevices = [];
module.exports.pinnedDevices = pinnedDevices;
@@ -42,9 +41,6 @@ function drawDeviceFrame(id) {
str += generateBodyHTML(d);
// str += "<script src='node_modules/lodash/core.min.js'></script>";
// str += "<script src='./plugins/" +d.type +"/update.js'></script>";
str += '</body></html>';
$deviceDrawArea.setAttribute('class', `${d.type} draw-area`);
@@ -158,14 +154,12 @@ function switchDevice(id) {
document.getElementById('all-devices').style.gridTemplateColumns = `repeat(${cols}, 1fr)`;
if (id === undefined) {
// document.getElementById('refresh-device-button').style.opacity = 0.2;
document.getElementById('refresh-device-button').disabled = true;
document.getElementById('device-settings-table').style.display = 'none';
return;
}
document.getElementById('refresh-device-button').disabled = false;
// document.getElementById('refresh-device-button').style.opacity = 1;
const i = DEVICE.all[id].id;
const $deviceWrapper = document.getElementById(`device-${i}`);
@@ -173,8 +167,6 @@ function switchDevice(id) {
if (!$deviceWrapper) {
const html = `<div class="col device-wrapper" id="device-${i}"><img id="device-${i}-pinned" class="device-pin" src="src/assets/img/outline_push_pin_white_18dp.png"><iframe id="device-${i}-draw-area" class="draw-area"></iframe></div>`;
document.getElementById('all-devices').insertAdjacentHTML('afterbegin', html);
// $deviceWrapper = document.getElementById(`device-${i}`);
}
window.switchClass(document.getElementById(id), 'active-device');
@@ -210,7 +202,7 @@ function updateFields() {
fields.forEach((field) => {
const $elem = document.createElement('input');
$elem.type = 'text';
$elem.value = activeDevice.fields[field.key]; // || field.value;
$elem.value = activeDevice.fields[field.key];
$elem.name = field.key;
$elem.onchange = function onchange(e) {
activeDevice.fields[field.key] = $elem.value;