From 63f4278b2bb7e0726376c2ae4461a76271a56fa0 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sat, 6 Apr 2024 23:37:30 -0400 Subject: [PATCH] Resolve startup order issues and explanation for all the delays that were meager attempts to solve a race condition. By moving more IPC connectionts to handles, which can be awaited, there are no more attempts to send message to light object that fails because it has not yet been instantiated. --- app/data/cfg.json | 2 +- app/lib/devices/index.js | 9 +++--- app/lib/devices/index.js.map | 2 +- app/lib/light/index.js | 4 +-- app/lib/light/index.js.map | 2 +- app/lib/ui/devices.js | 49 +++++++++++++++---------------- app/lib/ui/devices.js.map | 2 +- app/lib/ui/light.js | 49 +++++++++++++++++++------------ app/lib/ui/light.js.map | 2 +- app/lib/ui/timing.js | 23 +++++++++++++-- app/lib/ui/timing.js.map | 2 +- app/main.js | 16 ++++------ app/package-lock.json | 2 +- app/package.json | 2 +- app/src/lib/ui/devices.ts | 57 ++++++++++++++++++------------------ app/src/lib/ui/light.ts | 10 +++---- app/src/lib/ui/timing.ts | 13 +++++--- data/cfg.json | 2 +- package-lock.json | 4 +-- package.json | 2 +- processing/mcopy/cfg.json | 2 +- src/devices/index.ts | 16 +++++----- src/light/index.ts | 4 +-- 23 files changed, 154 insertions(+), 122 deletions(-) diff --git a/app/data/cfg.json b/app/data/cfg.json index a077a1d..088d94e 100644 --- a/app/data/cfg.json +++ b/app/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.8.101", + "version": "1.8.102", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/app/lib/devices/index.js b/app/lib/devices/index.js index 6680b34..2cf37c0 100644 --- a/app/lib/devices/index.js +++ b/app/lib/devices/index.js @@ -34,23 +34,24 @@ class Devices { * Listen to the "profile" channel for messages from the UI. **/ listen() { - this.ipc.on('profile', this.listener.bind(this)); + this.ipc.handle('profile', this.listener.bind(this)); } /** * The "profile" channel callback. If a profile is changed, set it in the * local settings object. **/ - listener(event, arg) { + async listener(event, arg) { if (typeof arg.profile !== 'undefined') { this.log.info(`Saving profile ${arg.profile}`, 'SETTINGS', false, false); this.settings.update('profile', arg.profile); - this.settings.save(); + await this.settings.save(); } if (typeof arg.timing !== 'undefined') { this.log.info(`Saving timing info`, 'SETTINGS', false, false); this.settings.update('timing', arg.timing); - this.settings.save(); + await this.settings.save(); } + return true; } /** * diff --git a/app/lib/devices/index.js.map b/app/lib/devices/index.js.map index 081e322..d7cb673 100644 --- a/app/lib/devices/index.js.map +++ b/app/lib/devices/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/devices/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,iCAA8B;AAC9B,2BAA4B;AAE5B;;;;IAII;AAEJ,MAAM,OAAO;IAYZ;;;QAGI;IACJ,YAAa,OAAiB,EAAE,QAAc,EAAE,UAAgB,EAAE,GAAS;QAbpE,cAAS,GAAS,EAAE,CAAA;QAc1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAA;QACrC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;IACD;;;QAGI;IACI,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,CAAC,EAAE,KAAK,EAAG,SAAS,EAAE,CAAC,CAAA;QAC3C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;QACvC,IAAI,CAAC,MAAM,EAAE,CAAC;IACf,CAAC;IACD;;QAEI;IACI,MAAM;QACb,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,CAAC;IACD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,OAAO,GAAG,UAAU,OAAiB,EAAE,QAAc,EAAE,UAAgB,EAAE,GAAS;IACxF,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,CAAC,CAAA;AACvD,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/light/index.js b/app/lib/light/index.js index 619d825..5fa4ce2 100644 --- a/app/lib/light/index.js +++ b/app/lib/light/index.js @@ -27,7 +27,7 @@ class Light { * **/ listen() { - this.ipc.on(this.id, this.listener.bind(this)); + this.ipc.handle(this.id, this.listener.bind(this)); } /** * @@ -47,7 +47,7 @@ class Light { else if (typeof arg.disable !== 'undefined') { this.enabled = false; } - event.returnValue = true; + return true; } /** * diff --git a/app/lib/light/index.js.map b/app/lib/light/index.js.map index 66dd360..d8bbaf6 100644 --- a/app/lib/light/index.js.map +++ b/app/lib/light/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/light/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,iCAA8B;AAC9B,2BAA4B;AAE5B,MAAM,KAAK;IAYV;;QAEI;IACJ,YAAa,OAAiB,EAAE,GAAS,EAAE,EAAQ;QAd5C,UAAK,GAAS,EAAE,KAAK,EAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAA;QAOlC,YAAO,GAAa,IAAI,CAAC;QAEzB,OAAE,GAAY,OAAO,CAAC;QAM7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;IAED;;QAEI;IACI,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,CAAC,EAAE,KAAK,EAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,G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CAAC;IAED;;QAEI;IACI,KAAK,CAAC,GAAG,CAAE,GAAc,EAAE,EAAW,EAAE,EAAW;QAC1D,IAAI,GAAG,CAAC;QACR,iBAAiB;QACjB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACpE,IAAI;YACH,8BAA8B;YAC9B,GAAG,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;SACnD;QAAC,OAAO,GAAG,EAAE;YACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACnB,MAAM,GAAG,CAAA;SACT;QACD,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,OAAiB,EAAE,GAAS,EAAE,EAAQ;IAChE,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/ui/devices.js b/app/lib/ui/devices.js index be00f09..4c31d1a 100644 --- a/app/lib/ui/devices.js +++ b/app/lib/ui/devices.js @@ -16,7 +16,7 @@ class Devices { } init() { this.listen(); - this.profiles(); + this.layoutProfiles(); gui.overlay(true); gui.spinner(true, 'Checking for connected devices...'); } @@ -69,7 +69,7 @@ class Devices { } } if (typeof arg !== 'undefined' && typeof arg.profile !== 'undefined') { - devices.profile(arg.profile); + yield devices.profile(arg.profile); } if (typeof arg !== 'undefined' && typeof arg.timing !== 'undefined') { timing.restore(arg.timing); @@ -86,15 +86,11 @@ class Devices { //add capper features to grid capper.enable(); } - log.info("Before stats"); seq.set(0, cfg.cmd.camera_forward); seq.set(1, cfg.cmd.projector_forward); grid.state(0); grid.state(1); seq.stats(); - log.info('Got past stats'); - //@ts-ignore - yield delay(1000); try { gui.spinner(false); gui.overlay(false); @@ -102,11 +98,30 @@ class Devices { catch (err) { log.error(err); } - log.info("Got here"); return event.returnValue = true; }); } - profiles() { + profile(profile) { + return __awaiter(this, void 0, void 0, function* () { + log.info(`Changed configuration profile to "${profile}"`, 'DEVICES', true, true); + const p = cfg.profiles[profile]; + const keys = Object.keys(p); + for (let key of keys) { + cfg[key] = keys[key]; + } + $('#profile').val(profile); + timing.reset(p); + if (typeof p.light !== 'undefined' && p.light === false) { + yield light.disable(); + } + else { + yield light.enable(); + } + yield ipcRenderer.invoke('profile', { profile }); + yield timing.store(); + }); + } + layoutProfiles() { const keys = Object.keys(cfg.profiles); const elem = $('#profile'); let opt; @@ -122,24 +137,6 @@ class Devices { this.profile(val); }); } - profile(profile) { - log.info(`Changed configuration profile to "${profile}"`, 'DEVICES', true, true); - const p = cfg.profiles[profile]; - const keys = Object.keys(p); - for (let key of keys) { - cfg[key] = keys[key]; - } - $('#profile').val(profile); - timing.reset(p); - if (typeof p.light !== 'undefined' && p.light === false) { - light.disable(); - } - else { - light.enable(); - } - ipcRenderer.send('profile', { profile }); - timing.store(); - } intval() { const url = $('#intval').val(); let proceed = false; diff --git a/app/lib/ui/devices.js.map b/app/lib/ui/devices.js.map index 81f0099..c99dc48 100644 --- a/app/lib/ui/devices.js.map +++ b/app/lib/ui/devices.js.map @@ -1 +1 @@ -{"version":3,"file":"devices.js","sourceRoot":"","sources":["../../src/lib/ui/devices.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,qCAAqC;AAErC,IAAI,OAAiB,CAAC;AAEtB,MAAM,OAAO;IAEZ;QADQ,OAAE,GAAY,SAAS,CAAC;IAGhC,CAAC;IACD,IAAI;QACH,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClB,GAAG,CAAC,OAAO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CAAC,8CAA8C,CAAC,CAAC;SACtD;QAED,IAAI,OAAO,EAAE;YACZ,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAClB,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,8BAA8B,GAAG,EAAE,CAAC,CAAC;YACvD,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;SACpC;aAAM;YACN,CAAC,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YACrD,CAAC,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;SACvC;IACF,CAAC;IAED,YAAY;QACX,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnB,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IAED,UAAU;QACT,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnB,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnB,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,yBAAyB,CAAC,CAAC;QACjD,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,4DAA4D,CAAC,CAAC;IACjF,CAAC;CACD;AAED,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAExB,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC"} \ No newline at end of file +{"version":3,"file":"devices.js","sourceRoot":"","sources":["../../src/lib/ui/devices.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,qCAAqC;AAErC,IAAI,OAAiB,CAAC;AAEtB,MAAM,OAAO;IAEZ;QADQ,OAAE,GAAY,SAAS,CAAC;IAGhC,CAAC;IACD,IAAI;QACH,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClB,GAAG,CAAC,OAA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AG,EAAE,CAAC,CAAC;YACvD,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;SACpC;aAAM;YACN,CAAC,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YACrD,CAAC,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;SACvC;IACF,CAAC;IAED,YAAY;QACX,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnB,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IAED,UAAU;QACT,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnB,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnB,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,yBAAyB,CAAC,CAAC;QACjD,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,4DAA4D,CAAC,CAAC;IACjF,CAAC;CACD;AAED,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAExB,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC"} \ No newline at end of file diff --git a/app/lib/ui/light.js b/app/lib/ui/light.js index 37442b1..6b990a9 100644 --- a/app/lib/ui/light.js +++ b/app/lib/ui/light.js @@ -1,4 +1,13 @@ 'use strict'; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; let light; class Light { constructor() { @@ -91,26 +100,30 @@ class Light { } } disable() { - const obj = { - disable: true, - id: uuid() - }; - this.disabled = true; - $('#tb_toolbar_item_light').hide(); - $('#seq_labels .spacer').eq(1).hide(); - $('#light_set').hide(); - ipcRenderer.sendSync(this.id, obj); + return __awaiter(this, void 0, void 0, function* () { + const obj = { + disable: true, + id: uuid() + }; + this.disabled = true; + $('#tb_toolbar_item_light').hide(); + $('#seq_labels .spacer').eq(1).hide(); + $('#light_set').hide(); + return ipcRenderer.invoke(this.id, obj); + }); } enable() { - const obj = { - enable: true, - id: uuid() - }; - light.disabled = false; - $('#tb_toolbar_item_light').show(); - $('#seq_labels .spacer').eq(1).show(); - $('#light_set').show(); - ipcRenderer.sendSync(light.id, obj); + return __awaiter(this, void 0, void 0, function* () { + const obj = { + enable: true, + id: uuid() + }; + this.disabled = false; + $('#tb_toolbar_item_light').show(); + $('#seq_labels .spacer').eq(1).show(); + $('#light_set').show(); + return ipcRenderer.invoke(this.id, obj); + }); } colorPickers() { //@ts-ignore diff --git a/app/lib/ui/light.js.map b/app/lib/ui/light.js.map index 65a7405..23df124 100644 --- a/app/lib/ui/light.js.map +++ b/app/lib/ui/light.js.map @@ -1 +1 @@ -{"version":3,"file":"light.js","sourceRoot":"","sources":["../../src/lib/ui/light.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAqBb,IAAI,KAAa,CAAC;AAElB,MAAM,KAAK;IAsEV;QArEA,OAAE,GAAY,OAAO,CAAC;QACtB,kBAAa,GAAa,KAAK,CAAC,CAAC,qCAAqC;QACtE,UAAK,GAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,eAAe;QAC9C,YAAO,GAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW;QACtC,SAAI,GAAS,EAAE,CAAC;QACT,aAAQ,GAAS;YACvB;gBACC,GAAG,EAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACf,IAAI,EAAG,KAAK;aACZ;YACD;gBACC,GAAG,EAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG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AG,CAAC,CAAC;SACnB;IACF,CAAC;IAED,GAAG;QACF,IAAI,MAAM,GAAG,CAAC,CAAC,wCAAwC,CAAC,CAAC;QACzD,CAAC,CAAC,yBAAyB,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;QACxD,CAAC,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAChC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AAED,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;AACpB,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"light.js","sourceRoot":"","sources":["../../src/lib/ui/light.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAqBb,IAAI,KAAa,CAAC;AAElB,MAAM,KAAK;IAsEV;QArEA,OAAE,GAAY,OAAO,CAAC;QACtB,kBAAa,GAAa,KAAK,CAAC,CAAC,qCAAqC;QACtE,UAAK,GAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,eAAe;QAC9C,YAAO,GAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW;QACtC,SAAI,GAAS,EAAE,CAAC;QACT,aAAQ,GAAS;YACvB;gBACC,GAAG,EAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACf,IAAI,EAAG,KAAK;aACZ;YACD;gBACC,GAAG,EAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;gBACrB,IAAI,EAAG,aAAa;aACpB;YACD;gBACC,GAAG,EAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE;gBAC/B,IAAI,EAAG,aAAa;aACpB;YACD;gBACC,GAAG,EAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE;gBAC/B,IAAI,EAAG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,MAAM,CAAC,CAAC;QAChC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AAED,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;AACpB,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC"} \ No newline at end of file diff --git a/app/lib/ui/timing.js b/app/lib/ui/timing.js index 3284a90..0290ed9 100644 --- a/app/lib/ui/timing.js +++ b/app/lib/ui/timing.js @@ -1,4 +1,13 @@ 'use strict'; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; let timing; class Timing { constructor() { @@ -85,14 +94,15 @@ class Timing { restore(timing) { for (let key in timing) { this.data[key] = timing[key]; + //log.info(`Timing [${key}] restored to ${timing[key]}`); } } //update with rolling average update(c, ms, force = false) { let cmd = this.fromArduino[c]; let id; - log.info(c); - log.info(cmd); + //log.info(c) + //log.info(cmd) if (typeof cmd !== 'undefined' && typeof this.data[cmd] !== 'undefined') { if (force) { log.info(`Forcing update of timing, ${ms}`); @@ -128,7 +138,14 @@ class Timing { return 0; } store() { - ipcRenderer.send('profile', { timing: this.data }); + return __awaiter(this, void 0, void 0, function* () { + try { + yield ipcRenderer.invoke('profile', { timing: this.data }); + } + catch (err) { + log.error(err); + } + }); } } timing = new Timing(); diff --git a/app/lib/ui/timing.js.map b/app/lib/ui/timing.js.map index 4363d99..ffad493 100644 --- a/app/lib/ui/timing.js.map +++ b/app/lib/ui/timing.js.map @@ -1 +1 @@ -{"version":3,"file":"timing.js","sourceRoot":"","sources":["../../src/lib/ui/timing.ts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AAI,CAAC,SAAS,EAAE,EAAE,MAAM,EAAG,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;IACpD,CAAC;CACD;AAED,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;AAEtB,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC"} \ No newline at end of file +{"version":3,"file":"timing.js","sourceRoot":"","sources":["../../src/lib/ui/timing.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,IAAI,MAAe,CAAC;AAMpB,MAAM,MAAM;IAkCX;QAjCO,SAAI,GAAgB,EAAE,CAAA;QAErB,gBAAW,GAAS;YAC3B,GAAG,EAAG,KAAK;YACR,GAAG,EAAG,MAAM;YACZ,GAAG,EAAG,MAAM;YACZ,GAAG,EAAG,OAAO;YAChB,GAAG,EAAG,MAAM;YACT,GAAG,EAAG,OAAO;YAChB,GAAG,EAAG,OAAO;SACb,CAAA;QAEO,YAAO,GAAU;YACxB,IAAI,EAAG,KAAK;YACZ,IAAI,EAAG,KAAK;YACZ,IAAI,EAAG,OAAO;YACX,IAAI,EAAG,OAAO;YACd,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,MAAM;YACb,KAAK,EAAG,MAAM;YACd,KAAK,EAAG,MAAM;YACd,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,MAAM;YACjB,IAAI,EAAG,MAAM;YACb,IAAI,EAAG,MAAM;YACb,KAAK,EAAG,OAAO;YACf,KAAK,EAAG,OAAO;YACf,KAAK,EAAG,OAAO;YACf,KAAK,EAAG,OAAO;YACf,MAAM,EAAG,OAAO;YAChB,MAAM,EAAG,OAAO;SAChB,CAAA;IAID,CAAC;IAEM,IAAI;QACV,IAAI,CAAC,MAAM,EAAE,CAAC;IACf,CAAC;IAEO,MAAM;QACb,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,CAAC;IAEO,MAAM,CAAE,KAA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WAAW,IAAI,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,WAAW,EAAE;YACxE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACtB;QACD,OAAO,CAAC,CAAC;IACV,CAAC;IAEY,KAAK;;YACjB,IAAI;gBACH,MAAM,WAAW,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAG,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;aAC5D;YAAC,OAAO,GAAG,EAAE;gBACb,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACf;QACF,CAAC;KAAA;CACD;AAED,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;AAEtB,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/app/main.js b/app/main.js index 1ca5473..30739d5 100644 --- a/app/main.js +++ b/app/main.js @@ -106,9 +106,12 @@ var init = async function () { arduino = require('arduino')(cfg, ee, errorState) dev = require('devices')(arduino, settings, mainWindow) - - //why is delay happening still? - await delay(2000) + server = require('server')(mainWindow.webContents) + light = require('light')(arduino, cfg, mainWindow.webContents) + filmout = require('filmout')(display, server, ffmpeg, ffprobe, mainWindow.webContents, light) + cam = require('cam')(arduino, cfg, mainWindow.webContents, filmout) + proj = require('proj')(arduino, cfg, mainWindow.webContents, filmout) + alert = require('alert')(mainWindow.webContents) try { await dev.enumerate() @@ -117,13 +120,6 @@ var init = async function () { log.error('Error enumerating connected devices', err) } - server = require('server')(mainWindow.webContents) - light = require('light')(arduino, cfg, mainWindow.webContents) - filmout = require('filmout')(display, server, ffmpeg, ffprobe, mainWindow.webContents, light) - cam = require('cam')(arduino, cfg, mainWindow.webContents, filmout) - proj = require('proj')(arduino, cfg, mainWindow.webContents, filmout) - alert = require('alert')(mainWindow.webContents) - if (dev && dev.connected && dev.connected.camera_second) { cam2 = require('cam')(arduino, cfg, mainWindow.webContents, filmout, true) } diff --git a/app/package-lock.json b/app/package-lock.json index 84c4d5e..f4e9501 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.8.101", + "version": "1.8.102", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/app/package.json b/app/package.json index 81ae171..dbda13d 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.8.101", + "version": "1.8.102", "description": "GUI for the mcopy small gauge film optical printer platform", "main": "main.js", "scripts": { diff --git a/app/src/lib/ui/devices.ts b/app/src/lib/ui/devices.ts index f21e6b0..b3fd3af 100644 --- a/app/src/lib/ui/devices.ts +++ b/app/src/lib/ui/devices.ts @@ -11,7 +11,7 @@ class Devices { } init () { this.listen(); - this.profiles(); + this.layoutProfiles(); gui.overlay(true); gui.spinner(true, 'Checking for connected devices...'); } @@ -67,34 +67,33 @@ class Devices { } if (typeof arg !== 'undefined' && typeof arg.profile !== 'undefined') { - devices.profile(arg.profile); + await devices.profile(arg.profile); } if (typeof arg !== 'undefined' && typeof arg.timing !== 'undefined') { timing.restore(arg.timing); } - + if (typeof arg !== 'undefined' && typeof arg.projector_second !== 'undefined') { //add second row of projector pads to grid proj.second.enable(); } + if (typeof arg !== 'undefined' && typeof arg.camera_second !== 'undefined') { //add second row of camera pads to grid cam.second.enable(); } + if (typeof arg !== 'undefined' && typeof arg.capper !== 'undefined') { //add capper features to grid capper.enable(); } - log.info("Before stats"); + seq.set(0, cfg.cmd.camera_forward); seq.set(1, cfg.cmd.projector_forward); grid.state(0); grid.state(1); seq.stats(); - log.info('Got past stats'); - //@ts-ignore - await delay(1000); try { gui.spinner(false); @@ -102,11 +101,32 @@ class Devices { } catch (err) { log.error(err); } - log.info("Got here"); + return event.returnValue = true; } - profiles () { + async profile (profile : string) { + log.info(`Changed configuration profile to "${profile}"`, 'DEVICES', true, true); + const p : any = cfg.profiles[profile]; + const keys : any[] = Object.keys(p); + for (let key of keys) { + cfg[key] = keys[key]; + } + $('#profile').val(profile); + + timing.reset(p); + + if (typeof p.light !== 'undefined' && p.light === false) { + await light.disable(); + } else { + await light.enable(); + } + + await ipcRenderer.invoke('profile', { profile }); + await timing.store(); + } + + layoutProfiles () { const keys : string[] = Object.keys(cfg.profiles); const elem : any = $('#profile'); let opt; @@ -123,25 +143,6 @@ class Devices { }); } - profile (profile : string) { - log.info(`Changed configuration profile to "${profile}"`, 'DEVICES', true, true); - const p : any = cfg.profiles[profile]; - const keys : any[] = Object.keys(p); - for (let key of keys) { - cfg[key] = keys[key]; - } - $('#profile').val(profile); - timing.reset(p); - if (typeof p.light !== 'undefined' && p.light === false) { - light.disable(); - } else { - light.enable(); - } - ipcRenderer.send('profile', { profile }); - timing.store(); - - } - intval () { const url : string = $('#intval').val() as string; let proceed : boolean = false; diff --git a/app/src/lib/ui/light.ts b/app/src/lib/ui/light.ts index ef34074..cccd5b5 100644 --- a/app/src/lib/ui/light.ts +++ b/app/src/lib/ui/light.ts @@ -121,7 +121,7 @@ class Light { } } - public disable () { + public async disable () { const obj : LightEvent = { disable : true, id : uuid() @@ -131,20 +131,20 @@ class Light { $('#seq_labels .spacer').eq(1).hide(); $('#light_set').hide(); - ipcRenderer.sendSync(this.id, obj); + return ipcRenderer.invoke(this.id, obj); } - public enable () { + public async enable () { const obj = { enable : true, id : uuid() }; - light.disabled = false; + this.disabled = false; $('#tb_toolbar_item_light').show(); $('#seq_labels .spacer').eq(1).show(); $('#light_set').show(); - ipcRenderer.sendSync(light.id, obj); + return ipcRenderer.invoke(this.id, obj); } public colorPickers () { diff --git a/app/src/lib/ui/timing.ts b/app/src/lib/ui/timing.ts index 380a87c..509955e 100644 --- a/app/src/lib/ui/timing.ts +++ b/app/src/lib/ui/timing.ts @@ -100,6 +100,7 @@ class Timing { public restore (timing : TimingData) { for (let key in timing) { this.data[key] = timing[key]; + //log.info(`Timing [${key}] restored to ${timing[key]}`); } } @@ -107,8 +108,8 @@ class Timing { public update (c : string, ms : number, force : boolean = false) { let cmd : string = this.fromArduino[c]; let id : string; - log.info(c) - log.info(cmd) + //log.info(c) + //log.info(cmd) if (typeof cmd !== 'undefined' && typeof this.data[cmd] !== 'undefined') { if (force) { log.info(`Forcing update of timing, ${ms}`); @@ -144,8 +145,12 @@ class Timing { return 0; } - public store () { - ipcRenderer.send('profile', { timing : this.data }) + public async store () { + try { + await ipcRenderer.invoke('profile', { timing : this.data }); + } catch (err) { + log.error(err); + } } } diff --git a/data/cfg.json b/data/cfg.json index a077a1d..088d94e 100644 --- a/data/cfg.json +++ b/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.8.101", + "version": "1.8.102", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/package-lock.json b/package-lock.json index 73a809c..8ee3ee2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mcopy", - "version": "1.8.101", + "version": "1.8.102", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mcopy", - "version": "1.8.101", + "version": "1.8.102", "license": "MIT", "dependencies": { "alert": "file:app/lib/alert", diff --git a/package.json b/package.json index 1201ad2..2a2fb10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mcopy", - "version": "1.8.101", + "version": "1.8.102", "description": "Small gauge film optical printer platform", "main": "build.js", "directories": { diff --git a/processing/mcopy/cfg.json b/processing/mcopy/cfg.json index a077a1d..088d94e 100644 --- a/processing/mcopy/cfg.json +++ b/processing/mcopy/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.8.101", + "version": "1.8.102", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/src/devices/index.ts b/src/devices/index.ts index 49b90a2..6504705 100644 --- a/src/devices/index.ts +++ b/src/devices/index.ts @@ -46,23 +46,24 @@ class Devices { * Listen to the "profile" channel for messages from the UI. **/ private listen () { - this.ipc.on('profile', this.listener.bind(this)); + this.ipc.handle('profile', this.listener.bind(this)); } /** * The "profile" channel callback. If a profile is changed, set it in the * local settings object. **/ - private listener (event : any, arg : any){ + private async listener (event : any, arg : any){ if (typeof arg.profile !== 'undefined') { this.log.info(`Saving profile ${arg.profile}`, 'SETTINGS', false, false); this.settings.update('profile', arg.profile); - this.settings.save(); + await this.settings.save(); } if (typeof arg.timing !== 'undefined') { this.log.info(`Saving timing info`, 'SETTINGS', false, false); this.settings.update('timing', arg.timing); - this.settings.save(); + await this.settings.save(); } + return true; } /** * @@ -140,7 +141,7 @@ class Devices { return null } - this.remember('arduino', device, serial) + this.remember(device, serial, 'arduino') this.log.info(`Determined ${device} to be ${device}`, 'SERIAL', true, true) @@ -504,7 +505,6 @@ class Devices { if (this.settings.state.camera && this.settings.state.camera.intval) { c.intval = this.settings.state.camera.intval - } return this.ready(p, c, l, cs, ps, capper) @@ -515,13 +515,15 @@ class Devices { private remember (device: string, serial : string, type : string) { let deviceEntry : any; const match = this.settings.state.devices.filter((dev : any) => { - if (dev[device] && dev[device] === serial) { + if (typeof dev.device !== 'undefined' && dev.device === device && + typeof dev.serial !== 'undefined' && dev.serial === serial) { return dev } }) if (match.length === 0) { deviceEntry = { device, + type, serial } this.settings.state.devices.push(deviceEntry) diff --git a/src/light/index.ts b/src/light/index.ts index 7b57921..cc1cbbb 100644 --- a/src/light/index.ts +++ b/src/light/index.ts @@ -38,7 +38,7 @@ class Light { * **/ private listen () { - this.ipc.on(this.id, this.listener.bind(this)); + this.ipc.handle(this.id, this.listener.bind(this)); } /** @@ -57,7 +57,7 @@ class Light { } else if (typeof arg.disable !== 'undefined') { this.enabled = false; } - event.returnValue = true + return true; } /**