aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjakob.stendahl <jakob.stendahl@infomedia.dk>2022-12-04 13:33:45 +0100
committerJakob Stendahl <jakob.stendahl@outlook.com>2022-12-04 13:34:22 +0100
commitc3b4742eeceee9250f8059972dd150f38e2eb021 (patch)
treeedde9ea65b554ff345788a916f238aed4a772b35 /src
parentc5dc2dfb92e4a6584d1e727bc39b8c9578f85b57 (diff)
downloadLuxcena-Neo-c3b4742eeceee9250f8059972dd150f38e2eb021.tar.gz
Luxcena-Neo-c3b4742eeceee9250f8059972dd150f38e2eb021.zip
Fix simulation stuttering (still resource intensive) and some oter QOL upgrades
Diffstat (limited to 'src')
-rw-r--r--src/NeoRuntimeManager/index.js19
-rw-r--r--src/SelfUpdater/index.js2
2 files changed, 19 insertions, 2 deletions
diff --git a/src/NeoRuntimeManager/index.js b/src/NeoRuntimeManager/index.js
index eb38632..1a56b04 100644
--- a/src/NeoRuntimeManager/index.js
+++ b/src/NeoRuntimeManager/index.js
@@ -33,6 +33,8 @@ let modeDebuggerId = null;
let modeDebuggerProcStartHandler = null;
/** @type {object} The last received matrix setup */
let matrix = null;
+/** @type {object} intervall for sending current state */
+let debugModeStateEmitIntervall = null;
eventEmitter.on("proc:exit", (code) => modeExitCode = code);
eventEmitter.on("matrix", (_matrix) => matrix = _matrix);
@@ -131,7 +133,9 @@ function stopMode(restart=false) {
* @return {object} A standardform return object.
*/
function startMode() {
- if (runtimeProcess === null) { return {success: false, reason: "no runtimeprocess", detail: "Runtimeprocess not set, did you mean to call setMode?"}; }
+ if (runtimeProcess === null) {
+ return {success: false, reason: "no runtimeprocess", detail: "Runtimeprocess not set, did you mean to call setMode?"};
+ }
return runtimeProcess.start();
};
@@ -226,6 +230,14 @@ function setVariable(name, value) {
}
/**
+ * A function intented to be used in an interval to emit
+ * the current debug-state.
+ *
+ */
+function debugModeEmitState() {
+}
+
+/**
* Start debugger for a mode
*
* @param {string} modeId - The mode to debug
@@ -248,6 +260,11 @@ function startDebugger(debuggerModeId) {
console.log(modeDebuggerProcStartHandler);
}
+ if (debugModeStateEmitIntervall == null) {
+ debugModeStateEmitIntervall = setInterval(() => {
+ }, 500);
+ }
+
modeDebuggerActive = true;
modeDebuggerId = debuggerModeId;
setTimeout(() => {
diff --git a/src/SelfUpdater/index.js b/src/SelfUpdater/index.js
index 68f6a1d..cc7ce13 100644
--- a/src/SelfUpdater/index.js
+++ b/src/SelfUpdater/index.js
@@ -212,7 +212,7 @@ class Updater {
let arch = (await this.run(`uname`, ["-m"])).out.replace("\n","");
if (arch == "armv6l") {
await this.run("wget", ["https://unofficial-builds.nodejs.org/download/release/v14.10.0/node-v14.10.0-linux-armv6l.tar.gz"]);
- await this.run("tar", ["-xzf" "node-v14.10.0-linux-armv6l.tar.gz"]);
+ await this.run("tar", ["-xzf", "node-v14.10.0-linux-armv6l.tar.gz"]);
await this.run("cp", ["-r", "node-v14.10.0-linux-armv6l/*", "/usr/local"]);
await this.run("rm", ["-r", "node-v14.10.0-linux-armv6l"]);
await this.run("rm", ["node-v14.10.0-linux-armv6l.tar.gz"]);