1
0
Fork 0

Merge pull request #3317 from atjn/sleeplog-warn

`sleeplog` Fix lint warnings
master
thyttan 2024-04-04 11:10:40 +02:00 committed by GitHub
commit 374b4bbae1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 65 additions and 95 deletions

View File

@ -59,13 +59,6 @@ module.exports = {
"no-unused-vars" "no-unused-vars"
] ]
}, },
"sleeplog/settings.js": {
"hash": "bd5e3e1382321df6682ef1cb718b0e15ab355422bef77278eb086f213f643021",
"rules": [
"no-unused-vars",
"no-undef"
]
},
"showimg/app.js": { "showimg/app.js": {
"hash": "71cbbaa488e2d08c5bf28f7d56178d5e7694eb9761cd4752bbc9733e825d4bcf", "hash": "71cbbaa488e2d08c5bf28f7d56178d5e7694eb9761cd4752bbc9733e825d4bcf",
"rules": [ "rules": [
@ -276,13 +269,6 @@ module.exports = {
"no-undef" "no-undef"
] ]
}, },
"sleeplog/app.js": {
"hash": "336da552e4b04677447cf76a253b40bc259a597ea11d455121933f93afe99794",
"rules": [
"no-unused-vars",
"no-undef"
]
},
"qmsched/app.js": { "qmsched/app.js": {
"hash": "4b7dbabed6c252021531d6b0449c16a3adc2e405f2ddda33ca0a65f5fa42c663", "hash": "4b7dbabed6c252021531d6b0449c16a3adc2e405f2ddda33ca0a65f5fa42c663",
"rules": [ "rules": [
@ -562,13 +548,6 @@ module.exports = {
"no-undef" "no-undef"
] ]
}, },
"sleeplog/lib.js": {
"hash": "755e0d4c02b92181281fd6990df39c9446c73ff896b50b64d7e14cb1c0188556",
"rules": [
"no-unused-vars",
"no-undef"
]
},
"doztime/app-bangle1.js": { "doztime/app-bangle1.js": {
"hash": "1e9598c201175180ae77d1c3bc47e8138b339b72eb58782b5057fb7aefdc88a1", "hash": "1e9598c201175180ae77d1c3bc47e8138b339b72eb58782b5057fb7aefdc88a1",
"rules": [ "rules": [
@ -756,12 +735,6 @@ module.exports = {
"no-undef" "no-undef"
] ]
}, },
"sleeplog/boot.js": {
"hash": "b4c9d8e3c3e7cdf44ea10e29a9e3b53f958b86c21ca91d88e4efb85901c3bde9",
"rules": [
"no-undef"
]
},
"scicalc/app.js": { "scicalc/app.js": {
"hash": "416c7b2eb12a5d10bcc3a99d89d8f6f54ecd2b47cce2d1f4d55c3e3bc602b31a", "hash": "416c7b2eb12a5d10bcc3a99d89d8f6f54ecd2b47cce2d1f4d55c3e3bc602b31a",
"rules": [ "rules": [

View File

@ -12,3 +12,4 @@
0.14: Add "Delete all logfiles before" to interface.html, display all logfiles in the interface 0.14: Add "Delete all logfiles before" to interface.html, display all logfiles in the interface
0.15: Issue newline before GB commands (solves issue with console.log and ignored commands) 0.15: Issue newline before GB commands (solves issue with console.log and ignored commands)
0.16: Only write logs if we have a non-empty log to write 0.16: Only write logs if we have a non-empty log to write
0.17: Minor code improvements

View File

@ -245,13 +245,13 @@ function draw() {
g.reset(); g.reset();
var imgStr = ""; var imgStr = "";
// check which icon to set // check which icon to set
if (!global.sleeplog || sleeplog.conf.enabled !== true) { if (!global.sleeplog || global.sleeplog.conf.enabled !== true) {
// set color and disabled service icon // set color and disabled service icon
g.setColor(1, 0, 0); g.setColor(1, 0, 0);
imgStr = "FBSBAOAAfwAP+AH3wD4+B8Hw+A+fAH/gA/wAH4AB+AA/wAf+APnwHw+D4Hx8A++AH/AA/gAH"; imgStr = "FBSBAOAAfwAP+AH3wD4+B8Hw+A+fAH/gA/wAH4AB+AA/wAf+APnwHw+D4Hx8A++AH/AA/gAH";
} else if (sleeplog.debug) { } else if (global.sleeplog.debug) {
// set debugging icon // set debugging icon
imgStr = typeof sleeplog.debug === "object" ? imgStr = typeof global.sleeplog.debug === "object" ?
"FBSBAB/4AQDAF+4BfvAX74F+CBf+gX/oFJKBf+gUkoF/6BSSgX/oFJ6Bf+gX/oF/6BAAgf/4" : // file "FBSBAB/4AQDAF+4BfvAX74F+CBf+gX/oFJKBf+gUkoF/6BSSgX/oFJ6Bf+gX/oF/6BAAgf/4" : // file
"FBSBAP//+f/V///4AAGAABkAAZgAGcABjgAYcAGDgBhwAY4AGcABmH+ZB/mAABgAAYAAH///"; // console "FBSBAP//+f/V///4AAGAABkAAZgAGcABjgAYcAGDgBhwAY4AGcABmH+ZB/mAABgAAYAAH///"; // console
} }
@ -297,7 +297,7 @@ var ATID; // analysis timeout ID
var drawingID = 0; // drawing ID for ongoing process var drawingID = 0; // drawing ID for ongoing process
// get screen width and center (zero based) // get screen width and center (zero based)
var width = g.getWidth() - 1; var width = g.getWidth() - 1;
var center = width / 2 - 1; //var center = width / 2 - 1;
// set areas and actions array // set areas and actions array
var aaa = [ var aaa = [

View File

@ -18,14 +18,14 @@ global.sleeplog = {
}; };
// check if service is enabled // check if service is enabled
if (sleeplog.conf.enabled) { if (global.sleeplog.conf.enabled) {
// assign functions to global object // assign functions to global object
global.sleeplog = Object.assign({ global.sleeplog = Object.assign({
// define function to initialy start or restart the service // define function to initialy start or restart the service
start: function() { start: function() {
// add kill and health listener // add kill and health listener
E.on('kill', sleeplog.saveStatus); E.on('kill', global.sleeplog.saveStatus);
Bangle.on('health', sleeplog.health); Bangle.on('health', global.sleeplog.health);
// restore saved status // restore saved status
this.restoreStatus(); this.restoreStatus();
@ -34,8 +34,8 @@ if (sleeplog.conf.enabled) {
// define function to stop the service, it will be restarted on reload if enabled // define function to stop the service, it will be restarted on reload if enabled
stop: function() { stop: function() {
// remove all listeners // remove all listeners
Bangle.removeListener('health', sleeplog.health); Bangle.removeListener('health', global.sleeplog.health);
E.removeListener('kill', sleeplog.saveStatus); E.removeListener('kill', global.sleeplog.saveStatus);
// save active values // save active values
this.saveStatus(); this.saveStatus();
@ -122,11 +122,11 @@ if (sleeplog.conf.enabled) {
if (!global.sleeplog) return new Error("sleeplog: Can't save status, global object missing!"); if (!global.sleeplog) return new Error("sleeplog: Can't save status, global object missing!");
// check saveUpToDate is not set or forced // check saveUpToDate is not set or forced
if (!sleeplog.info.saveUpToDate || force) { if (!global.sleeplog.info.saveUpToDate || force) {
// save status, consecutive status and info timestamps to restore on reload // save status, consecutive status and info timestamps to restore on reload
var save = [sleeplog.info.lastCheck, sleeplog.info.awakeSince, sleeplog.info.asleepSince]; var save = [global.sleeplog.info.lastCheck, global.sleeplog.info.awakeSince, global.sleeplog.info.asleepSince];
// add debuging status if active // add debuging status if active
if (sleeplog.debug) save.push(sleeplog.debug.writeUntil, sleeplog.debug.fileid); if (global.sleeplog.debug) save.push(global.sleeplog.debug.writeUntil, global.sleeplog.debug.fileid);
// stringify entries // stringify entries
save = "," + save.map((entry, index) => { save = "," + save.map((entry, index) => {
@ -135,8 +135,8 @@ if (sleeplog.conf.enabled) {
}).join(",") + "\n"; }).join(",") + "\n";
// add present status if forced // add present status if forced
if (force) save = (sleeplog.info.lastChange / 6E5) + "," + if (force) save = (global.sleeplog.info.lastChange / 6E5) + "," +
sleeplog.status + "," + sleeplog.consecutive + "\n" + save; global.sleeplog.status + "," + global.sleeplog.consecutive + "\n" + save;
// append saved data to StorageFile // append saved data to StorageFile
require("Storage").open("sleeplog.log", "a").write(save); require("Storage").open("sleeplog.log", "a").write(save);
@ -161,20 +161,20 @@ if (sleeplog.conf.enabled) {
// add preliminary status depending on charging and movement thresholds // add preliminary status depending on charging and movement thresholds
// 1 = not worn, 2 = awake, 3 = light sleep, 4 = deep sleep // 1 = not worn, 2 = awake, 3 = light sleep, 4 = deep sleep
data.status = Bangle.isCharging() ? 1 : data.status = Bangle.isCharging() ? 1 :
data.movement <= sleeplog.conf.deepTh ? 4 : data.movement <= global.sleeplog.conf.deepTh ? 4 :
data.movement <= sleeplog.conf.lightTh ? 3 : 2; data.movement <= global.sleeplog.conf.lightTh ? 3 : 2;
// check if changing to deep sleep from non sleeping // check if changing to deep sleep from non sleeping
if (data.status === 4 && sleeplog.status <= 2) { if (data.status === 4 && global.sleeplog.status <= 2) {
sleeplog.checkIsWearing((isWearing, data) => { global.sleeplog.checkIsWearing((isWearing, data) => {
// correct status // correct status
if (!isWearing) data.status = 1; if (!isWearing) data.status = 1;
// set status // set status
sleeplog.setStatus(data); global.sleeplog.setStatus(data);
}, data); }, data);
} else { } else {
// set status // set status
sleeplog.setStatus(data); global.sleeplog.setStatus(data);
} }
}, },
@ -185,7 +185,7 @@ if (sleeplog.conf.enabled) {
} }
// create a temporary object to store data and functions // create a temporary object to store data and functions
global.tmpWearingCheck = { const tmpWearingCheck = {
// define temporary hrm listener function to read the wearing status // define temporary hrm listener function to read the wearing status
hrmListener: hrm => tmpWearingCheck.isWearing = hrm.isWearing, hrmListener: hrm => tmpWearingCheck.isWearing = hrm.isWearing,
// set default wearing status // set default wearing status
@ -195,22 +195,18 @@ if (sleeplog.conf.enabled) {
// enable HRM // enable HRM
Bangle.setHRMPower(true, "wearingCheck"); Bangle.setHRMPower(true, "wearingCheck");
// wait until HRM is initialised // wait until HRM is initialised
setTimeout((returnFn, data) => { setTimeout((returnFn, data, tmpWearingCheck) => {
// add HRM listener // add HRM listener
Bangle.on('HRM-raw', tmpWearingCheck.hrmListener); Bangle.on('HRM-raw', tmpWearingCheck.hrmListener);
// wait for two cycles (HRM working on 60Hz) // wait for two cycles (HRM working on 60Hz)
setTimeout((returnFn, data) => { setTimeout((returnFn, data, tmpWearingCheck) => {
// remove listener and disable HRM // remove listener and disable HRM
Bangle.removeListener('HRM-raw', tmpWearingCheck.hrmListener); Bangle.removeListener('HRM-raw', tmpWearingCheck.hrmListener);
Bangle.setHRMPower(false, "wearingCheck"); Bangle.setHRMPower(false, "wearingCheck");
// cache wearing status
var isWearing = tmpWearingCheck.isWearing;
// clear temporary object
delete global.tmpWearingCheck;
// call return function with status // call return function with status
returnFn(isWearing, data); returnFn(tmpWearingCheck.isWearing, data);
}, 34, returnFn, data); }, 34, returnFn, data, tmpWearingCheck);
}, 2500, returnFn, data); }, 2500, returnFn, data, tmpWearingCheck);
}, },
// define function to set the status // define function to set the status
@ -361,7 +357,7 @@ if (sleeplog.conf.enabled) {
// define trigger object // define trigger object
trigger: {} trigger: {}
}, sleeplog); }, global.sleeplog);
// initial starting // initial starting
global.sleeplog.start(); global.sleeplog.start();

View File

@ -3,7 +3,7 @@ exports = {
// define en-/disable function, restarts the service to make changes take effect // define en-/disable function, restarts the service to make changes take effect
setEnabled: function(enable) { setEnabled: function(enable) {
// stop if enabled // stop if enabled
if (global.sleeplog && sleeplog.enabled) sleeplog.stop(); if (global.sleeplog && global.sleeplog.enabled) global.sleeplog.stop();
// define settings filename // define settings filename
var settings = "sleeplog.json"; var settings = "sleeplog.json";
@ -138,7 +138,7 @@ exports = {
} }
// define last index // define last index
var lastIndex = log.length - 1; //var lastIndex = log.length - 1;
// set timestamp of first entry to since if first entry before since // set timestamp of first entry to since if first entry before since
if (log[0] && log[0][0] < since) log[0][0] = since; if (log[0] && log[0][0] < since) log[0][0] = since;
// add timestamp at now with unknown status if until after now // add timestamp at now with unknown status if until after now
@ -251,7 +251,7 @@ exports = {
// set default date or correct date type if needed // set default date or correct date type if needed
if (!date || !date.getDay) date = date ? new Date(date) : new Date(); if (!date || !date.getDay) date = date ? new Date(date) : new Date();
// set default ToD as set in sleeplog.conf or settings if available // set default ToD as set in sleeplog.conf or settings if available
if (ToD === undefined) ToD = (global.sleeplog && sleeplog.conf ? sleeplog.conf.breakToD : if (ToD === undefined) ToD = (global.sleeplog && global.sleeplog.conf ? global.sleeplog.conf.breakToD :
(require("Storage").readJSON("sleeplog.json", true) || {}).breakToD) || 12; (require("Storage").readJSON("sleeplog.json", true) || {}).breakToD) || 12;
// calculate last break time and return // calculate last break time and return
return new Date(date.getFullYear(), date.getMonth(), date.getDate(), ToD); return new Date(date.getFullYear(), date.getMonth(), date.getDate(), ToD);
@ -274,24 +274,24 @@ exports = {
// check if nothing has to be changed // check if nothing has to be changed
if (!duration && if (!duration &&
(enable && sleeplog.debug === true) || (enable && global.sleeplog.debug === true) ||
(!enable && !sleeplog.debug)) return; (!enable && !global.sleeplog.debug)) return;
// check if en- or disable debugging // check if en- or disable debugging
if (enable) { if (enable) {
// define debug object // define debug object
sleeplog.debug = {}; global.sleeplog.debug = {};
// check if a file should be generated // check if a file should be generated
if (typeof duration === "number") { if (typeof duration === "number") {
// check duration boundaries, 0 => 8 // check duration boundaries, 0 => 8
duration = duration > 96 ? 96 : duration || 12; duration = duration > 96 ? 96 : duration || 12;
// calculate and set writeUntil in 10min steps // calculate and set writeUntil in 10min steps
sleeplog.debug.writeUntil = ((Date.now() / 6E5 | 0) + duration * 6) * 6E5; global.sleeplog.debug.writeUntil = ((Date.now() / 6E5 | 0) + duration * 6) * 6E5;
// set fileid to "{hours since 1970}" // set fileid to "{hours since 1970}"
sleeplog.debug.fileid = Date.now() / 36E5 | 0; global.sleeplog.debug.fileid = Date.now() / 36E5 | 0;
// write csv header on empty file // write csv header on empty file
var file = require("Storage").open("sleeplog_" + sleeplog.debug.fileid + ".csv", "a"); var file = require("Storage").open("sleeplog_" + global.sleeplog.debug.fileid + ".csv", "a");
if (!file.getLength()) file.write( if (!file.getLength()) file.write(
"timestamp,movement,status,consecutive,asleepSince,awakeSince,bpm,bpmConfidence\n" "timestamp,movement,status,consecutive,asleepSince,awakeSince,bpm,bpmConfidence\n"
); );
@ -299,21 +299,21 @@ exports = {
file = undefined; file = undefined;
} else { } else {
// set debug as active // set debug as active
sleeplog.debug = true; global.sleeplog.debug = true;
} }
} else { } else {
// disable debugging // disable debugging
delete sleeplog.debug; delete global.sleeplog.debug;
} }
// save status forced // save status forced
sleeplog.saveStatus(true); global.sleeplog.saveStatus(true);
}, },
// define debugging function, called after logging if debug is set // define debugging function, called after logging if debug is set
debug: function(data) { debug: function(data) {
// check if global variable accessable and debug active // check if global variable accessable and debug active
if (!global.sleeplog || !sleeplog.debug) return; if (!global.sleeplog || !global.sleeplog.debug) return;
// set functions to convert timestamps // set functions to convert timestamps
function localTime(timestamp) { function localTime(timestamp) {
@ -328,10 +328,10 @@ exports = {
var console = "sleeplog: " + var console = "sleeplog: " +
localTime(data.timestamp) + " > " + localTime(data.timestamp) + " > " +
"movement: " + ("" + data.movement).padStart(4) + ", " + "movement: " + ("" + data.movement).padStart(4) + ", " +
"unknown ,non consec.,consecutive".split(",")[sleeplog.consecutive] + " " + "unknown ,non consec.,consecutive".split(",")[global.sleeplog.consecutive] + " " +
"unknown,not worn,awake,light sleep,deep sleep".split(",")[data.status].padEnd(12) + ", " + "unknown,not worn,awake,light sleep,deep sleep".split(",")[data.status].padEnd(12) + ", " +
"asleep since: " + localTime(sleeplog.info.asleepSince) + ", " + "asleep since: " + localTime(global.sleeplog.info.asleepSince) + ", " +
"awake since: " + localTime(sleeplog.info.awakeSince); "awake since: " + localTime(global.sleeplog.info.awakeSince);
// add bpm if set // add bpm if set
if (data.bpm) console += ", " + if (data.bpm) console += ", " +
"bpm: " + ("" + data.bpm).padStart(3) + ", " + "bpm: " + ("" + data.bpm).padStart(3) + ", " +
@ -340,24 +340,24 @@ exports = {
print(console); print(console);
// check if debug is set as object with a file id and it is not past writeUntil // check if debug is set as object with a file id and it is not past writeUntil
if (typeof sleeplog.debug === "object" && sleeplog.debug.fileid && if (typeof global.sleeplog.debug === "object" && global.sleeplog.debug.fileid &&
Date.now() < sleeplog.debug.writeUntil) { Date.now() < global.sleeplog.debug.writeUntil) {
// generate next csv line // generate next csv line
var csv = [ var csv = [
officeTime(data.timestamp), officeTime(data.timestamp),
data.movement, data.movement,
data.status, data.status,
sleeplog.consecutive, global.sleeplog.consecutive,
sleeplog.info.asleepSince ? officeTime(sleeplog.info.asleepSince) : "", global.sleeplog.info.asleepSince ? officeTime(global.sleeplog.info.asleepSince) : "",
sleeplog.info.awakeSince ? officeTime(sleeplog.info.awakeSince) : "", global.sleeplog.info.awakeSince ? officeTime(global.sleeplog.info.awakeSince) : "",
data.bpm || "", data.bpm || "",
data.bpmConfidence || "" data.bpmConfidence || ""
].join(","); ].join(",");
// write next line to log if set // write next line to log if set
require("Storage").open("sleeplog_" + sleeplog.debug.fileid + ".csv", "a").write(csv + "\n"); require("Storage").open("sleeplog_" + global.sleeplog.debug.fileid + ".csv", "a").write(csv + "\n");
} else { } else {
// clear file setting in debug // clear file setting in debug
sleeplog.debug = true; global.sleeplog.debug = true;
} }
}, },

View File

@ -2,7 +2,7 @@
"id":"sleeplog", "id":"sleeplog",
"name":"Sleep Log", "name":"Sleep Log",
"shortName": "SleepLog", "shortName": "SleepLog",
"version": "0.16", "version": "0.17",
"description": "Log and view your sleeping habits. This app is using the built in movement calculation.", "description": "Log and view your sleeping habits. This app is using the built in movement calculation.",
"icon": "app.png", "icon": "app.png",
"type": "app", "type": "app",

View File

@ -174,8 +174,8 @@
} }
// get thresholds // get thresholds
var deepTh = global.sleeplog ? sleeplog.conf.deepTh : defaults.deepTh; var deepTh = global.sleeplog ? global.sleeplog.conf.deepTh : defaults.deepTh;
var lightTh = global.sleeplog ? sleeplog.conf.lightTh : defaults.lightTh; var lightTh = global.sleeplog ? global.sleeplog.conf.lightTh : defaults.lightTh;
// set lowest movement displayed // set lowest movement displayed
var minMove = deepTh - 20; var minMove = deepTh - 20;
// set start point // set start point
@ -240,8 +240,8 @@
// check if sleeplog is available // check if sleeplog is available
if (global.sleeplog) { if (global.sleeplog) {
// get debug status, file and duration // get debug status, file and duration
var enabled = !!sleeplog.debug; var enabled = !!global.sleeplog.debug;
var file = typeof sleeplog.debug === "object"; var file = typeof global.sleeplog.debug === "object";
var duration = 0; var duration = 0;
// setup debugging menu // setup debugging menu
var debugMenu = { var debugMenu = {
@ -250,7 +250,7 @@
}, },
/*LANG*/"< Back": () => { /*LANG*/"< Back": () => {
// check if some value has changed // check if some value has changed
if (enabled !== !!sleeplog.debug || file !== (typeof sleeplog.debug === "object") || duration) if (enabled !== !!global.sleeplog.debug || file !== (typeof global.sleeplog.debug === "object") || duration)
require("sleeplog").setDebug(enabled, file ? duration || 12 : undefined); require("sleeplog").setDebug(enabled, file ? duration || 12 : undefined);
// redraw main menu // redraw main menu
showMain(7); showMain(7);
@ -265,7 +265,7 @@
onchange: v => file = v onchange: v => file = v
}, },
/*LANG*/"Duration": { /*LANG*/"Duration": {
value: file ? (sleeplog.debug.writeUntil - Date.now()) / 36E5 | 0 : 12, value: file ? (global.sleeplog.debug.writeUntil - Date.now()) / 36E5 | 0 : 12,
min: 1, min: 1,
max: 96, max: 96,
wrap: true, wrap: true,
@ -275,7 +275,7 @@
/*LANG*/"Cancel": () => showMain(7), /*LANG*/"Cancel": () => showMain(7),
}; };
// show menu // show menu
var menu = E.showMenu(debugMenu); /*var menu =*/ E.showMenu(debugMenu);
} else { } else {
// show error prompt // show error prompt
E.showPrompt("Sleeplog" + /*LANG*/"not enabled!", { E.showPrompt("Sleeplog" + /*LANG*/"not enabled!", {
@ -290,7 +290,7 @@
// show menu to change thresholds // show menu to change thresholds
function showThresholds() { function showThresholds() {
// setup logging menu // setup logging menu
var menu; //var menu;
var thresholdsMenu = { var thresholdsMenu = {
"": { "": {
title: /*LANG*/"Thresholds" title: /*LANG*/"Thresholds"
@ -377,9 +377,9 @@
buttons: { buttons: {
/*LANG*/"Ok": 0 /*LANG*/"Ok": 0
} }
}).then(() => menu = E.showMenu(thresholdsMenu)); }).then(() => /*menu =*/ E.showMenu(thresholdsMenu));
} else { } else {
menu = E.showMenu(thresholdsMenu); /*menu =*/ E.showMenu(thresholdsMenu);
} }
} }
@ -388,9 +388,9 @@
// set debug image // set debug image
var debugImg = !global.sleeplog ? var debugImg = !global.sleeplog ?
"FBSBAOAAfwAP+AH3wD4+B8Hw+A+fAH/gA/wAH4AB+AA/wAf+APnwHw+D4Hx8A++AH/AA/gAH" : // X "FBSBAOAAfwAP+AH3wD4+B8Hw+A+fAH/gA/wAH4AB+AA/wAf+APnwHw+D4Hx8A++AH/AA/gAH" : // X
typeof sleeplog.debug === "object" ? typeof global.sleeplog.debug === "object" ?
"FBSBAB/4AQDAF+4BfvAX74F+CBf+gX/oFJKBf+gUkoF/6BSSgX/oFJ6Bf+gX/oF/6BAAgf/4" : // file "FBSBAB/4AQDAF+4BfvAX74F+CBf+gX/oFJKBf+gUkoF/6BSSgX/oFJ6Bf+gX/oF/6BAAgf/4" : // file
sleeplog.debug ? global.sleeplog.debug ?
"FBSBAP//+f/V///4AAGAABkAAZgAGcABjgAYcAGDgBhwAY4AGcABmH+ZB/mAABgAAYAAH///" : // console "FBSBAP//+f/V///4AAGAABkAAZgAGcABjgAYcAGDgBhwAY4AGcABmH+ZB/mAABgAAYAAH///" : // console
0; // off 0; // off
debugImg = debugImg ? "\0" + atob(debugImg) : false; debugImg = debugImg ? "\0" + atob(debugImg) : false;
@ -440,7 +440,7 @@
onchange: () => setTimeout(showDebug, 10) onchange: () => setTimeout(showDebug, 10)
} }
}; };
var menu = E.showMenu(mainMenu); /*var menu =*/ E.showMenu(mainMenu);
} }
// draw main menu // draw main menu