From cb63194fc65fbcabc05d344dc89fa4d2bc1a292d Mon Sep 17 00:00:00 2001 From: mattmcw Date: Thu, 23 May 2024 18:49:18 -0400 Subject: [PATCH] All known classes have types exported and imported into dependent modules. This has already caught a class of bugs. Removing references to any will catch another. --- app/lib/alert/index.d.ts | 25 ++++- app/lib/alert/index.js | 2 + app/lib/alert/index.js.map | 2 +- app/lib/arduino/index.d.ts | 174 +++++++++++++++++++++++++++++- app/lib/arduino/index.js | 6 +- app/lib/arduino/index.js.map | 2 +- app/lib/cam/index.d.ts | 65 +++++++++++ app/lib/cam/index.js | 18 ++-- app/lib/cam/index.js.map | 2 +- app/lib/capper/index.d.ts | 38 ++++++- app/lib/capper/index.js | 3 + app/lib/capper/index.js.map | 2 +- app/lib/cmd/index.d.ts | 175 +++++++++++++++++++++++++++++- app/lib/cmd/index.js | 123 ++++++++++++--------- app/lib/cmd/index.js.map | 2 +- app/lib/delay/index.d.ts | 2 +- app/lib/delay/index.js | 2 +- app/lib/delay/index.js.map | 2 +- app/lib/devices/index.d.ts | 81 +++++++++++++- app/lib/devices/index.js | 2 + app/lib/devices/index.js.map | 2 +- app/lib/display/index.d.ts | 18 +++- app/lib/display/index.js | 6 +- app/lib/display/index.js.map | 2 +- app/lib/exec/index.js.map | 2 +- app/lib/exit/index.js | 2 +- app/lib/exit/index.js.map | 2 +- app/lib/ffmpeg/index.d.ts | 85 ++++++++++++++- app/lib/ffmpeg/index.js | 2 + app/lib/ffmpeg/index.js.map | 2 +- app/lib/ffprobe/index.d.ts | 29 ++++- app/lib/ffprobe/index.js | 4 +- app/lib/ffprobe/index.js.map | 2 +- app/lib/filmout/index.d.ts | 172 ++++++++++++++++++++++++++++- app/lib/filmout/index.js | 5 + app/lib/filmout/index.js.map | 2 +- app/lib/frame/index.d.ts | 2 +- app/lib/intval/index.d.ts | 7 +- app/lib/intval/index.js | 35 ++++-- app/lib/intval/index.js.map | 2 +- app/lib/light/index.d.ts | 36 ++++++- app/lib/light/index.js | 2 + app/lib/light/index.js.map | 2 +- app/lib/mscript/index.d.ts | 2 +- app/lib/processing/index.d.ts | 7 +- app/lib/processing/index.js | 4 +- app/lib/processing/index.js.map | 2 +- app/lib/proj/index.d.ts | 47 +++++++- app/lib/proj/index.js | 19 ++-- app/lib/proj/index.js.map | 2 +- app/lib/sequencer/index.d.ts | 101 ++++++++++++++++- app/lib/sequencer/index.js | 10 +- app/lib/sequencer/index.js.map | 2 +- app/lib/server/index.d.ts | 59 +++++++++- app/lib/server/index.js | 2 + app/lib/server/index.js.map | 2 +- app/lib/ui/cam.js | 2 +- app/lib/ui/proj.js | 4 +- src/alert/index.ts | 6 +- src/arduino/index.ts | 6 +- src/cam/index.ts | 39 ++++--- src/capper/index.ts | 22 ++-- src/cmd/index.ts | 186 ++++++++++++++++++-------------- src/delay/index.ts | 4 +- src/devices/index.ts | 5 +- src/display/index.ts | 7 +- src/exec/index.ts | 2 +- src/exit/index.ts | 2 +- src/ffmpeg/index.ts | 21 ++-- src/ffprobe/index.ts | 4 +- src/filmout/index.ts | 50 ++++++--- src/frame/index.ts | 4 +- src/globals.d.ts | 23 ---- src/intval/index.ts | 27 ++--- src/light/index.ts | 3 +- src/mscript/index.ts | 2 +- src/processing/index.ts | 12 +-- src/proj/index.ts | 36 ++++--- src/sequencer/index.ts | 10 +- src/server/index.ts | 10 +- 80 files changed, 1543 insertions(+), 354 deletions(-) diff --git a/app/lib/alert/index.d.ts b/app/lib/alert/index.d.ts index cb0ff5c..5077d07 100644 --- a/app/lib/alert/index.d.ts +++ b/app/lib/alert/index.d.ts @@ -1 +1,24 @@ -export {}; +export declare class Alert { + private ipc; + private log; + private id; + private cb; + private ui; + constructor(ui: any); + /** + * + **/ + private init; + /** + * + **/ + private listen; + /** + * + **/ + private listener; + /** + * + **/ + start(cmd: string): Promise; +} diff --git a/app/lib/alert/index.js b/app/lib/alert/index.js index f5a78f1..654df1d 100644 --- a/app/lib/alert/index.js +++ b/app/lib/alert/index.js @@ -1,5 +1,6 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); +exports.Alert = void 0; const log_1 = require("log"); /* class representing alert functionality */ class Alert { @@ -52,6 +53,7 @@ class Alert { }.bind(this)); } } +exports.Alert = Alert; module.exports = function (ui) { return new Alert(ui); }; diff --git a/app/lib/alert/index.js.map b/app/lib/alert/index.js.map index 4a8319b..52fb4b9 100644 --- a/app/lib/alert/index.js.map +++ b/app/lib/alert/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/alert/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,6BAA0B;AAG1B,4CAA4C;AAE5C,MAAM,KAAK;IAOV,YAAc,EAAQ;QAJd,OAAE,GAAY,OAAO,CAAA;QACrB,OAAE,GAAc,IAAI,CAAA;QAI3B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;QACZ,IAAI,CAAC,IAAI,EAAE,CAAA;IACZ,CAAC;IAED;;QAEI;IACI,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,GAAG,GAAG,MAAM,IAAA,SAAG,EAAC,EAAE,KAAK,EAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;QACzC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAA;QACtC,IAAI,CAAC,MAAM,EAAE,CAAA;IACd,CAAC;IAED;;QAEI;IACI,MAAM;QACb,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IAC/C,CAAC;IAED;;QAEI;IACI,KAAK,CAAC,QAAQ,CAAE,KAAW,EAAE,GAAS;QAC7C,IAAI,IAAI,CAAC,EAAE,KAAK,IAAI,EAAE;YACrB,IAAI;gBACH,MAAM,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAA;aAChC;YAAC,OAA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,OAAO,IAAI,OAAO,CAAC,UAAU,OAAkB,EAAE,MAAiB;YACjE,IAAI,CAAC,EAAE,GAAG;gBACT,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC;gBACjC,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC;YACpB,CAAC,CAAA;QACF,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACf,CAAC;CACD;AAxDD,sBAwDC;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,EAAQ;IAClC,OAAO,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/arduino/index.d.ts b/app/lib/arduino/index.d.ts index cb0ff5c..7e4b80c 100644 --- a/app/lib/arduino/index.d.ts +++ b/app/lib/arduino/index.d.ts @@ -1 +1,173 @@ -export {}; +/** + * Class representing the arduino communication features + **/ +export declare class Arduino { + private log; + private path; + private known; + private serial; + private baud; + private queue; + private timer; + private locks; + private confirmExec; + private errorState; + private keys; + private values; + alias: any; + stateStr: any; + hasState: any; + constructor(errorState: Function); + init(): Promise; + /** + * Enumerate all connected devices that might be Arduinos + * + * @async + * @returns {Promise} Resolves after enumerating + **/ + enumerate(): Promise; + /** + * Send a command to an Arduino using async/await + * + * @param {string} device The Arduino device identifier + * @param {string} cmd Single character command to send + * + * @async + * @returns {Promise} Resolves after sending + **/ + private sendAsync; + /** + * Sends a command to the specified Arduino and waits for a response. + * Handles the communication lock to prevent sending multiple commands simultaneously. + * Emits an 'arduino_send' event after successfully sending the command. + * + * @async + * @param {string} device - The Arduino device identifier. + * @param {string} cmd - The command to be sent to the Arduino. + * @returns {Promise} Returns 'false' if the communication is locked, otherwise returns the response from the device. + * @throws {Error} Throws an error if the sendAsync method encounters an error. + **/ + send(device: string, cmd: string): Promise; + /** + * Sends a string to the specified Arduino. + * Handles different types of devices, including fake devices for testing purposes. + * Waits for a specified delay before sending the string. + * + * @async + * @param {string} device - The Arduino device identifier. + * @param {string} str - The string to be sent to the Arduino. + * @returns {Promise} Returns 'true' if the string is sent successfully, otherwise returns an error message. + * @throws {Error} Throws an error if the writeAsync method encounters an error. + **/ + sendString(device: string, str: string): Promise; + /** + * + **/ + private stateAsync; + /** + * + **/ + state(device: string, confirm?: boolean): Promise; + /** + * Send a string to an Arduino using async/await + * + * @param {string} device Arduino identifier + * @param {string} str String to send + * + * @returns {Promise} Resolves after sending + **/ + private writeAsync; + /** + * Handles the end of communication with the Arduino. + * Calculates the time taken for the communication, executes the callback, + * and emits an 'arduino_end' event. Handles errors and stray data received. + * + * @param {string} serial - The serial address of the Arduino device. + * @param {string} data - The data received from the Arduino. + * @returns {any} The time taken for the communication in milliseconds. + **/ + private end; + private error; + /** + * Associates an alias with an Arduinos serial address. + * Used to map multi-purpose devices onto the same serial connection. + * + * @param {string} device - The serial number of the target Arduino. + * @param {string} serial - The alias to be associated with the target device. + **/ + aliasSerial(device: string, serial: string): void; + /** + * Connects to an Arduino using its serial number. + * Sets up the SerialPort instance and path for the device, and handles data communication. + * Handles opening the connection and emitting 'arduino_end' or 'confirmEnd' events upon receiving data. + * + * @async + * @param {string} device - The device identifier (common name). + * @param {string} serial - The serial address of the target Arduino (e.g., COM port on Windows). + * @param {function} confirm - A callback function to be executed upon receiving confirmation data. + * @returns {Promise} Resolves with the device path if the connection is successful. + * @throws {Error} Rejects with an error message if the connection fails. + **/ + connect(device: string, serial: string, confirm: any): Promise; + /** + * Handles the confirmation data received from an Arduino. + * Executes the confirmation callback function if the received data is present in the list of expected values. + * + * @param {string} data - The data received from the Arduino. + **/ + private confirmEnd; + /** + * Verifies the connection to an Arduino by sending a connect command. + * The confirmation callback checks if the received data matches the expected connect command. + * + * @async + * @returns {Promise} Resolves with 'true' if the connection is verified successfully. + * @throws {Error} Rejects with an error message if the connection verification fails. + **/ + verify(): Promise; + /** + * Distinguishes the type of Arduino connected. + * Sends a command to the device to identify its type and resolves the promise with the received type. + * + * @async + * @returns {Promise} Resolves with the type of the connected Arduino-based device. + * @throws {Error} Rejects with an error message if the distinguish operation fails. + **/ + distinguish(): Promise; + /** + * Closes the connection to an Arduino. + * + * @async + * @returns {Promise} Resolves with 'true' if the connection is closed successfully. + * @throws {Error} Throws an error if the closeArduino method encounters an error. + **/ + close(): Promise; + /** + * Establishes a fake connection to an Arduino for testing purposes. + * Creates a fake SerialPort instance with custom write and string methods. + * + * @async + * @param {string} serial - The device identifier of the fake Arduino. + * @returns {Promise} Resolves with 'true' if the fake connection is established successfully. + **/ + fakeConnect(device: string): Promise; + /** + * Connect to an Arduino using async/await + * + * @param {string} device Arduino identifier + * + * @returns {Promise} Resolves after opening + **/ + private openArduino; + /** + * Close a connection to an Arduino using async/await + * + * @param {string} device Arduino identifier + * + * @returns {Promise} Resolves after closing + **/ + private closeArduino; + private lock; + private unlock; + private isLocked; +} diff --git a/app/lib/arduino/index.js b/app/lib/arduino/index.js index 494750a..488ec7a 100644 --- a/app/lib/arduino/index.js +++ b/app/lib/arduino/index.js @@ -1,5 +1,6 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); +exports.Arduino = void 0; /** * 2023-07-16 Clarification * @@ -41,14 +42,14 @@ class Arduino { constructor(errorState) { this.path = {}; this.known = KNOWN; - this.alias = {}; this.serial = {}; - this.hasState = {}; this.baud = 57600; this.queue = {}; this.timer = 0; this.locks = {}; + this.alias = {}; this.stateStr = {}; + this.hasState = {}; this.errorState = errorState; this.init(); } @@ -593,6 +594,7 @@ class Arduino { return typeof this.locks[serial] !== 'undefined' && this.locks[serial] === true; } } +exports.Arduino = Arduino; if (typeof module !== 'undefined' && module.parent) { module.exports = function (c, ee, errorState) { eventEmitter = ee; diff --git a/app/lib/arduino/index.js.map b/app/lib/arduino/index.js.map index d2ac683..628d12f 100644 --- a/app/lib/arduino/index.js.map +++ b/app/lib/arduino/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/arduino/index.ts"],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C,CAAC,CAAA;QACH,CAAC,CAAC,CAAA;IACH,CAAC;IAEO,IAAI,CAAE,MAAe;QAC5B,0CAA0C;QAC1C,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;IAC1B,CAAC;IAEO,MAAM,CAAE,MAAe;QAC9B,4CAA4C;QAC5C,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAA;IAC3B,CAAC;IAEO,QAAQ,CAAE,MAAe;QAChC,OAAO,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;IAChF,CAAC;CACD;AA1iBD,0BA0iBC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE;IACnD,MAAM,CAAC,OAAO,GAAG,UAAU,CAAO,EAAE,EAAQ,EAAE,UAAqB;QAClE,YAAY,GAAG,EAAE,CAAA;QACjB,GAAG,GAAG,CAAC,CAAA;QACP,OAAO,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,CAAA;QACjC,OAAO,OAAO,CAAA;IACf,CAAC,CAAA;CACD"} \ No newline at end of file diff --git a/app/lib/cam/index.d.ts b/app/lib/cam/index.d.ts index cb0ff5c..a90f541 100644 --- a/app/lib/cam/index.d.ts +++ b/app/lib/cam/index.d.ts @@ -1 +1,66 @@ +import type { Arduino } from 'arduino'; +import type { FilmOut } from 'filmout'; +interface CameraState { + pos: number; + dir: boolean; + capper: boolean; +} +/** class representing camera functions **/ +export declare class Camera { + state: CameraState; + arduino: Arduino; + private intval; + private processing; + private log; + private cfg; + private filmout; + private ui; + private ipc; + private id; + /** + * + **/ + constructor(arduino: Arduino, cfg: any, ui: any, filmout: FilmOut, second?: boolean); + /** + * + **/ + private init; + /** + * + **/ + private listen; + /** + * + **/ + set(dir: boolean, id: string): Promise; + /** + * + **/ + cap(state: boolean, id: string): Promise; + /** + * + **/ + move(id: string): Promise; + both(id: string): Promise; + /** + * + **/ + exposure(exposure: number, id: string): Promise; + /** + * + **/ + private connectIntval; + /** + * + **/ + private connectProcessing; + /** + * + **/ + private listener; + /** + * + **/ + private end; +} export {}; diff --git a/app/lib/cam/index.js b/app/lib/cam/index.js index 7daab6b..e4f8126 100644 --- a/app/lib/cam/index.js +++ b/app/lib/cam/index.js @@ -1,5 +1,6 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); +exports.Camera = void 0; const intval_1 = require("intval"); const processing_1 = require("processing"); const delay_1 = require("delay"); @@ -13,7 +14,7 @@ class Camera { this.state = { pos: 0, dir: true, - capepr: false + capper: false }; this.arduino = null; this.intval = null; @@ -106,7 +107,7 @@ class Camera { /** * **/ - async move(frame, id) { + async move(id) { const cmd = this.cfg.arduino.cmd[this.id]; let ms; if (this.filmout.state.enabled) { @@ -125,7 +126,7 @@ class Camera { ms = await this.intval.move(); } catch (err) { - this.log.error(err); + this.log.error(`Error moving intval ${this.id}: ${id}`, err); } } else { @@ -143,14 +144,14 @@ class Camera { //this.log.info('Camera move time', { ms }); return this.end(cmd, id, ms); } - async both(frame, id) { + async both(id) { const cmd = this.cfg.arduino.cmd[id]; let ms; try { ms = await this.arduino.send(this.id, cmd); } catch (err) { - this.log.error(`Error moving ${this.id}`, err); + this.log.error(`Error moving both ${this.id}: ${id}`, err); } //this.log.info('Cameras move time', { ms }); return await this.end(cmd, id, ms); @@ -167,7 +168,7 @@ class Camera { let parts; let confirmExposure; if (this.intval) { - return this.intval.setExposure(this.id, exposure, (ms) => { + return this.intval.setExposure(exposure, (ms) => { this.ui.send('timing', { c: 'c', ms: exposure }); return this.end(cmd, id, ms); }); @@ -258,9 +259,9 @@ class Camera { this.log.error(err); } } - else if (typeof arg.frame !== 'undefined') { + else if (typeof arg.move !== 'undefined') { try { - await this.move(arg.frame, arg.id); + await this.move(arg.id); } catch (err) { this.log.error(err); @@ -336,6 +337,7 @@ class Camera { return ms; } } +exports.Camera = Camera; module.exports = function (arduino, cfg, ui, filmout, second) { return new Camera(arduino, cfg, ui, filmout, second); }; diff --git a/app/lib/cam/index.js.map b/app/lib/cam/index.js.map index 743b523..aac0bd2 100644 --- a/app/lib/cam/index.js.map +++ b/app/lib/cam/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cam/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,mCAAgC;AAChC,2CAAwC;AACxC,iCAA8B;AAC9B,6BAA0B;AAG1B,2CAA2C;AAE3C,MAAM,MAAM;IAeX;;QAEI;IACJ,YAAa,OAAiB,EAAE,GAAS,EAAE,EAAQ,EAAE,OAAa,EAAE,SAAmB,KAAK;QAjBpF,UAAK,GAAS;YACrB,GAAG,EAAG,CAAC;YACP,GAAG,EAAG,IAAI;YACV,MAAM,EAAE,KAAK;SACb,CAAC;QACM,YAAO,GAAa,IAAI,CAAC;QACzB,WAAM,GAAS,IAAI,CAAC;QACpB,eAAU,GAAS,IAAI,CAAC;QAMxB,OAAE,GAAY,QAAQ,CAAC;QAK9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,MAAM;YAAE,IAAI,CAAC,EAAE,IAAI,SAAS,CAAC;QACjC,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;IAED;;QAEI;IACI,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,GAAG,GAAG,MAAM,IAAA,SAAG,EAAC,EAAE,KAAK,EAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;QACvC,IAAI,CAAC,MAAM,EAAE,CAAC;IACf,CAAC;IAED;;QAEI;IACI,MAA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EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/capper/index.d.ts b/app/lib/capper/index.d.ts index cb0ff5c..8304d46 100644 --- a/app/lib/capper/index.d.ts +++ b/app/lib/capper/index.d.ts @@ -1 +1,37 @@ -export {}; +import type { FilmOut } from 'filmout'; +import type { Arduino } from 'arduino'; +/** class representing capper functions **/ +export declare class Capper { + private state; + private arduino; + private log; + private cfg; + private filmout; + private ui; + private ipc; + private id; + /** + * + **/ + constructor(arduino: Arduino, cfg: any, ui: any, filmout: FilmOut); + /** + * + **/ + private init; + /** + * + **/ + private listen; + /** + * + **/ + capper(state: boolean, id: string): Promise; + /** + * + **/ + private listener; + /** + * + **/ + private end; +} diff --git a/app/lib/capper/index.js b/app/lib/capper/index.js index 7fd7f0f..8052eab 100644 --- a/app/lib/capper/index.js +++ b/app/lib/capper/index.js @@ -1,5 +1,6 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); +exports.Capper = void 0; const log_1 = require("log"); /** class representing capper functions **/ class Capper { @@ -81,8 +82,10 @@ class Capper { message += ` ${ms}ms`; this.log.info(message); this.ui.send(this.id, { cmd: cmd, id: id, ms: ms }); + return ms; } } +exports.Capper = Capper; module.exports = function (arduino, cfg, ui, filmout) { return new Capper(arduino, cfg, ui, filmout); }; diff --git a/app/lib/capper/index.js.map b/app/lib/capper/index.js.map index 19a4020..ebccffb 100644 --- a/app/lib/capper/index.js.map +++ b/app/lib/capper/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/capper/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAKb,6BAA0B;AAI1B,2CAA2C;AAE3C,MAAM,MAAM;IAWX;;QAEI;IACJ,YAAa,OAAiB,EAAE,GAAS,EAAE,EAAQ,EAAE,OAAa;QAb1D,UAAK,GAAS;YACrB,MAAM,EAAG,KAAK;SACd,CAAC;QACM,YAAO,GAAa,IAA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C,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE;YACnD,OAAO,GAAG,mBAAmB,CAAC;SAC9B;QAED,OAAO,IAAI,IAAI,EAAE,IAAI,CAAC;QAEtB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAC,CAAC,CAAC;QACnD,OAAO,EAAE,CAAC;IACX,CAAC;CACD;AA9FD,wBA8FC;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,OAAiB,EAAE,GAAS,EAAE,EAAQ,EAAE,OAAY;IAC9E,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/cmd/index.d.ts b/app/lib/cmd/index.d.ts index cb0ff5c..a819f40 100644 --- a/app/lib/cmd/index.d.ts +++ b/app/lib/cmd/index.d.ts @@ -1 +1,174 @@ -export {}; +import type { Projector } from 'proj'; +import type { Camera } from 'cam'; +import type { Light } from 'light'; +import type { Capper } from 'capper'; +import type { Alert } from 'alert'; +export declare class Commands { + proj: Projector; + cam: Camera; + light: Light; + cam2: Camera; + proj2: Projector; + capper: Capper; + alertObj: Alert; + private cfg; + private ipc; + /** + * @constructor + * Assign all connected devices and mock devices as private classes. + * + * @param {object} cfg Configuration object + * @param {object} proj Projector 1 + * @param {object} cam Camera 1 + * @param {object} light Light source + * @param {object} alert Alert object + * @param {object} cam2 (optional) Camera 2 + * @param {object} proj2 (optional) Projector 2 + * @param {object} capper Capper object + * + **/ + constructor(cfg: any, proj: Projector, cam: any, light: Light, alert: Alert, cam2?: any, proj2?: Projector, capper?: any); + /** + * Move the projector one frame forward + * + * @returns {integer} Length of action in ms + **/ + projector_forward(): Promise; + /** + * Move the projector one frame backward + * + * @returns {integer} Length of action in ms + **/ + projector_backward(): Promise; + /** + * Move the camera one frame forward + * + * @param {object} cmd Full cmd object + * + * @returns {integer} Length of action in ms + **/ + camera_forward(): Promise; + /** + * Move the camera one frame forward with light off + * + * @returns {integer} Length of action in ms + **/ + black_forward(): Promise; + /** + * Move the camera one frame backward + * + * @param {object} cmd Full cmd object + * + * @returns {integer} Length of action in ms + **/ + camera_backward(): Promise; + /** + * Move the camera one frame forward, light set to black or off + * + * @returns {integer} Length of action in ms + **/ + black_backward(): Promise; + /** + * Move the second camera one frame forward + * + * @param {object} cmd Full cmd object + * + * @returns {integer} Length of action in ms + **/ + camera_second_forward(): Promise; + /** + * Move the second camera one frame backward + * + * @param {object} cmd Full cmd object + * + * @returns {integer} Length of action in ms + **/ + camera_second_backward(): Promise; + /** + * Move the both cameras one frame forward + * + * @param {object} cmd Full cmd object + * + * @returns {integer} Length of action in ms + **/ + cameras_forward(): Promise; + /** + * Move the both cameras one frame backward + * + * @param {object} cmd Full cmd object + * + * @returns {integer} Length of action in ms + **/ + cameras_backward(): Promise; + /** + * Move first camera one frame forward and rewind secondary camera one frame backward + * + * @param {object} cmd Full cmd object + * + * @returns {integer} Length of action in ms + **/ + camera_forward_camera_second_backward(): Promise; + /** + * Rewind first camera one frame backward and move secondary camera one frame forward + * + * @param {object} cmd Full cmd object + * + * @returns {integer} Length of action in ms + **/ + camera_backward_camera_second_forward(): Promise; + /** + * Move the secondary projector forward one frame + * + * @returns {integer} Length of action in ms + **/ + projector_second_forward(): Promise; + /** + * Rewind the secondary projector backward one frame + * + * @returns {integer} Length of action in ms + **/ + projector_second_backward(): Promise; + /** + * Move the both projectors forward one frame + * + * @returns {integer} Length of action in ms + **/ + projectors_forward(): Promise; + /** + * Rewind both projectors backwards one frame + * + * @returns {integer} Length of action in ms + **/ + projectors_backward(): Promise; + /** + * Move the primary projector forward one frame and rewind the secondary projector + * one frame backwards. + * + * @returns {integer} Length of action in ms + **/ + projector_forward_projector_second_backward(): Promise; + /** + * Rewind the primary projector backwards one frame and move the secondary + * projector forward one frame. + * + * @returns {integer} Length of action in ms + **/ + projector_backward_projector_second_forward(): Promise; + /** + * Throws an alert to pause a sequence + * + * @returns {integer} Length of action in ms + **/ + alert(cmd: any): Promise; + /** + * Pauses a sequence for a length of time + * + * @returns {integer} Length of action in ms + **/ + pause(cmd: any): Promise; + /** + * Sets the camera exposure (if supported). + * + **/ + camera_exposure(cmd: any): Promise; +} diff --git a/app/lib/cmd/index.js b/app/lib/cmd/index.js index 17edb65..3431ab0 100644 --- a/app/lib/cmd/index.js +++ b/app/lib/cmd/index.js @@ -1,5 +1,6 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); +exports.Commands = void 0; const uuid_1 = require("uuid"); const delay_1 = require("delay"); class Commands { @@ -37,14 +38,15 @@ class Commands { * @returns {integer} Length of action in ms **/ async projector_forward() { + const id = (0, uuid_1.v4)(); let ms; try { if (!this.proj.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.proj.set(true); + await this.proj.set(true, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - ms = await this.proj.move(); + ms = await this.proj.move(id); } catch (err) { throw err; @@ -57,14 +59,15 @@ class Commands { * @returns {integer} Length of action in ms **/ async projector_backward() { + const id = (0, uuid_1.v4)(); let ms; try { if (this.proj.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.proj.set(false); + await this.proj.set(false, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - ms = await this.proj.move(); + ms = await this.proj.move(id); } catch (err) { throw err; @@ -86,12 +89,12 @@ class Commands { try { if (!this.cam.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.cam.set(true); + await this.cam.set(true, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - ms = await this.cam.move(); + ms = await this.cam.move(id); await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(off, id); } @@ -112,7 +115,7 @@ class Commands { try { if (!this.cam.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.cam.set(true); + await this.cam.set(true, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); if (this.capper) { @@ -121,7 +124,7 @@ class Commands { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(off, id); //make sure set to off await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - ms += await this.cam.move(); + ms += await this.cam.move(id); await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(off, id); if (this.capper) { @@ -148,12 +151,12 @@ class Commands { try { if (this.cam.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.cam.set(false); + await this.cam.set(false, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - ms = await this.cam.move(); + ms = await this.cam.move(id); await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(off, id); } @@ -174,7 +177,7 @@ class Commands { try { if (this.cam.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.cam.set(false); + await this.cam.set(false, id); } if (this.capper) { ms += await this.capper.capper(true, id); @@ -182,7 +185,7 @@ class Commands { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(off, id); //make sure set to off await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - ms += await this.cam.move(); + ms += await this.cam.move(id); await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(off, id); if (this.capper) { @@ -209,12 +212,12 @@ class Commands { try { if (!this.cam2.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.cam2.set(true); + await this.cam2.set(true, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - ms = await this.cam2.move(); + ms = await this.cam2.move(id); await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(off, id); } @@ -238,12 +241,12 @@ class Commands { try { if (this.cam2.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.cam2.set(false); + await this.cam2.set(false, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - ms = await this.cam2.move(); + ms = await this.cam2.move(id); await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(off, id); } @@ -268,20 +271,20 @@ class Commands { try { if (!this.cam.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.cam.set(true); + await this.cam.set(true, id); } if (!this.cam2.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.cam2.set(true); + await this.cam2.set(true, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await (0, delay_1.delay)(this.cfg.arduino.serialDelay); if (this.cam && this.cam2 && this.cam.arduino.alias.camera === this.cam.arduino.alias.camera_second) { - ms = await this.cam.both(); + ms = await this.cam.both(id); } else { - both = await Promise.all([this.cam.move(), this.cam2.move()]); + both = await Promise.all([this.cam.move(id), this.cam2.move(id)]); ms = Math.max(...both); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); @@ -308,20 +311,20 @@ class Commands { try { if (this.cam.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.cam.set(false); + await this.cam.set(false, id); } if (this.cam2.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.cam2.set(false); + await this.cam2.set(false, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await (0, delay_1.delay)(this.cfg.arduino.serialDelay); if (this.cam && this.cam2 && this.cam.arduino.alias.camera === this.cam.arduino.alias.camera_second) { - ms = await this.cam.both(); + ms = await this.cam.both(id); } else { - both = await Promise.all([this.cam.move(), this.cam2.move()]); + both = await Promise.all([this.cam.move(id), this.cam2.move(id)]); ms = Math.max(...both); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); @@ -348,20 +351,20 @@ class Commands { try { if (!this.cam.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.cam.set(true); + await this.cam.set(true, id); } if (this.cam2.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.cam2.set(false); + await this.cam2.set(false, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await (0, delay_1.delay)(this.cfg.arduino.serialDelay); if (this.cam && this.cam2 && this.cam.arduino.alias.camera === this.cam.arduino.alias.camera_second) { - ms = await this.cam.both(); + ms = await this.cam.both(id); } else { - both = await Promise.all([this.cam.move(), this.cam2.move()]); + both = await Promise.all([this.cam.move(id), this.cam2.move(id)]); ms = Math.max(...both); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); @@ -388,20 +391,20 @@ class Commands { try { if (this.cam.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.cam.set(false); + await this.cam.set(false, id); } if (!this.cam2.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.cam2.set(true); + await this.cam2.set(true, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await (0, delay_1.delay)(this.cfg.arduino.serialDelay); if (this.cam && this.cam2 && this.cam.arduino.alias.camera === this.cam.arduino.alias.camera_second) { - ms = await this.cam.both(); + ms = await this.cam.both(id); } else { - both = await Promise.all([this.cam.move(), this.cam2.move()]); + both = await Promise.all([this.cam.move(id), this.cam2.move(id)]); ms = Math.max(...both); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); @@ -418,14 +421,15 @@ class Commands { * @returns {integer} Length of action in ms **/ async projector_second_forward() { + const id = (0, uuid_1.v4)(); let ms; try { if (!this.proj2.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.proj2.set(true); + await this.proj2.set(true, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - ms = await this.proj2.move(); + ms = await this.proj2.move(id); } catch (err) { throw err; @@ -438,14 +442,15 @@ class Commands { * @returns {integer} Length of action in ms **/ async projector_second_backward() { + const id = (0, uuid_1.v4)(); let ms; try { if (this.proj2.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.proj2.set(false); + await this.proj2.set(false, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - ms = await this.proj2.move(); + ms = await this.proj2.move(id); } catch (err) { throw err; @@ -458,23 +463,24 @@ class Commands { * @returns {integer} Length of action in ms **/ async projectors_forward() { + const id = (0, uuid_1.v4)(); let both; let ms; try { if (!this.proj.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.proj.set(true); + await this.proj.set(true, id); } if (!this.proj2.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.proj2.set(true); + await this.proj2.set(true, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); if (this.proj && this.proj2 && this.proj.arduino.alias.projector === this.proj.arduino.alias.projector_second) { - ms = await this.proj.both(); + ms = await this.proj.both(id); } else { - both = await Promise.all([this.proj.move(), this.proj2.move()]); + both = await Promise.all([this.proj.move(id), this.proj2.move(id)]); ms = Math.max(...both); } } @@ -489,23 +495,24 @@ class Commands { * @returns {integer} Length of action in ms **/ async projectors_backward() { + const id = (0, uuid_1.v4)(); let both; let ms; try { if (this.proj.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.proj.set(false); + await this.proj.set(false, id); } if (this.proj2.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.proj2.set(false); + await this.proj2.set(false, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); if (this.proj && this.proj2 && this.proj.arduino.alias.projector === this.proj.arduino.alias.projector_second) { - ms = await this.proj.both(); + ms = await this.proj.both(id); } else { - both = await Promise.all([this.proj.move(), this.proj2.move()]); + both = await Promise.all([this.proj.move(id), this.proj2.move(id)]); ms = Math.max(...both); } } @@ -521,23 +528,24 @@ class Commands { * @returns {integer} Length of action in ms **/ async projector_forward_projector_second_backward() { + const id = (0, uuid_1.v4)(); let both; let ms; try { if (!this.proj.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.proj.set(true); + await this.proj.set(true, id); } if (this.proj2.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.proj2.set(false); + await this.proj2.set(false, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); if (this.proj && this.proj2 && this.proj.arduino.alias.projector === this.proj.arduino.alias.projector_second) { - ms = await this.proj.both(); + ms = await this.proj.both(id); } else { - both = await Promise.all([this.proj.move(), this.proj2.move()]); + both = await Promise.all([this.proj.move(id), this.proj2.move(id)]); ms = Math.max(...both); } } @@ -553,23 +561,24 @@ class Commands { * @returns {integer} Length of action in ms **/ async projector_backward_projector_second_forward() { + const id = (0, uuid_1.v4)(); let both; let ms; try { if (this.proj.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.proj.set(false); + await this.proj.set(false, id); } if (!this.proj2.state.dir) { await (0, delay_1.delay)(this.cfg.arduino.serialDelay); - await this.proj2.set(true); + await this.proj2.set(true, id); } await (0, delay_1.delay)(this.cfg.arduino.serialDelay); if (this.proj && this.proj2 && this.proj.arduino.alias.projector === this.proj.arduino.alias.projector_second) { - ms = await this.proj.both(); + ms = await this.proj.both(id); } else { - both = await Promise.all([this.proj.move(), this.proj2.move()]); + both = await Promise.all([this.proj.move(id), this.proj2.move(id)]); ms = Math.max(...both); } } @@ -584,6 +593,7 @@ class Commands { * @returns {integer} Length of action in ms **/ async alert(cmd) { + const id = (0, uuid_1.v4)(); let ms; try { ms = await this.alertObj.start(cmd.light); //change this meta @@ -599,6 +609,7 @@ class Commands { * @returns {integer} Length of action in ms **/ async pause(cmd) { + const id = (0, uuid_1.v4)(); let ms; try { ms = await (0, delay_1.delay)(cmd.light * 1000); //delay is in seconds @@ -608,10 +619,15 @@ class Commands { } return ms; } + /** + * Sets the camera exposure (if supported). + * + **/ async camera_exposure(cmd) { + const id = (0, uuid_1.v4)(); let ms; try { - ms = await this.cam.exposure(cmd.light); + ms = await this.cam.exposure(cmd.light, id); } catch (err) { throw err; @@ -619,6 +635,7 @@ class Commands { return ms; } } +exports.Commands = Commands; module.exports = function (cfg, proj, cam, light, alert, cam2, proj2, capper) { return new Commands(cfg, proj, cam, light, alert, cam2, proj2, capper); }; diff --git a/app/lib/cmd/index.js.map b/app/lib/cmd/index.js.map index 2f75688..1f479bc 100644 --- a/app/lib/cmd/index.js.map +++ b/app/lib/cmd/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cmd/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,+BAAkC;AAClC,iCAA8B;AAE9B,MAAM,QAAQ;IAeb;;;;;;;;;;;;;QAaI;IAEJ,YAAa,GAAS,EAAE,IAAU,EAAE,GAAS,EAAE,KAAW,EAAE,KAAW,EAAE,OAAa,IAAI,EAAE,QAAc,IAAI,EAAE,SAAe,IAAI;QAClI,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QAEtB,IAAI,IAAI,KAAK,IAAI;YAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACpC,IAAI,KAAK,KAAK,IAAI;YAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACvC,IAAI,MAAM,KAAK,IAAI;YAAE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAE1C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,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AAG,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;SAC5C;QAAC,OAAO,GAAG,EAAE;YACb,MAAM,GAAG,CAAC;SACV;QACD,OAAO,EAAE,CAAC;IACX,CAAC;CACD;AA/nBD,4BA+nBC;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,GAAS,EAAE,IAAU,EAAE,GAAS,EAAE,KAAW,EAAE,KAAW,EAAE,IAAU,EAAE,KAAW,EAAE,MAAY;IAC3H,OAAO,IAAI,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACxE,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/delay/index.d.ts b/app/lib/delay/index.d.ts index dd5a0d5..f0cbee0 100644 --- a/app/lib/delay/index.d.ts +++ b/app/lib/delay/index.d.ts @@ -5,4 +5,4 @@ * * @returns {Promise} Promise to resolve after timeout **/ -export declare function delay(ms: number): Promise; +export declare function delay(ms: number): Promise; diff --git a/app/lib/delay/index.js b/app/lib/delay/index.js index d88ffb3..56cb810 100644 --- a/app/lib/delay/index.js +++ b/app/lib/delay/index.js @@ -10,7 +10,7 @@ exports.delay = void 0; **/ function delay(ms) { return new Promise((resolve) => { - return setTimeout(resolve, ms); + return setTimeout(() => { resolve(ms); }, ms); }); } exports.delay = delay; diff --git a/app/lib/delay/index.js.map b/app/lib/delay/index.js.map index 4f2feb7..e7a5757 100644 --- a/app/lib/delay/index.js.map +++ b/app/lib/delay/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/delay/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb;;;;;;IAMI;AAEJ,SAAgB,KAAK,CAAE,EAAW;IACjC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAa,EAAE,EAAE;QACpC,OAAO,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACJ,CAAC;AAJD,sBAIC;AAED,MAAM,CAAC,OAAO,GAAG,EAAE,KAAK,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/delay/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb;;;;;;IAMI;AAEJ,SAAgB,KAAK,CAAE,EAAW;IACjC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAa,EAAE,EAAE;QACpC,OAAO,UAAU,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACJ,CAAC;AAJD,sBAIC;AAED,MAAM,CAAC,OAAO,GAAG,EAAE,KAAK,EAAE,CAAC"} \ No newline at end of file diff --git a/app/lib/devices/index.d.ts b/app/lib/devices/index.d.ts index cb0ff5c..b4b1b32 100644 --- a/app/lib/devices/index.d.ts +++ b/app/lib/devices/index.d.ts @@ -1 +1,80 @@ -export {}; +import type { Settings } from 'settings'; +import type { Arduino } from 'arduino'; +/** + * class representing the device discovery features + * + * + **/ +export declare class Devices { + settings: Settings; + connected: any; + private arduino; + private log; + private ui; + private ipc; + private mainWindow; + private cam; + /** + * Constructor assigns arduino, settings, UI browser window and cam objects + * locally to this class for reference. + **/ + constructor(arduino: Arduino, settings: Settings, mainWindow: any, cam: any); + /** + * Initialize the log for "devices". Establish an ipc connection to the UI. + * Start listening on that ipc connection. + **/ + private init; + /** + * Listen to the "profile" channel for messages from the UI. + **/ + private listen; + /** + * The "profile" channel callback. If a profile is changed, set it in the + * local settings object. + **/ + private listener; + /** + * + **/ + enumerate(): Promise; + /** + * + **/ + private favor; + /** + * + **/ + private distinguish; + /** + * + **/ + private fakeProjector; + /** + * + **/ + private fakeCamera; + /** + * + **/ + private fakeLight; + /** + * + **/ + private fakeCapper; + /** + * + **/ + private connectDevice; + /** + * + **/ + private all; + /** + * + **/ + private remember; + /** + * + **/ + private ready; +} diff --git a/app/lib/devices/index.js b/app/lib/devices/index.js index d2fe737..74c6f8e 100644 --- a/app/lib/devices/index.js +++ b/app/lib/devices/index.js @@ -1,5 +1,6 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); +exports.Devices = void 0; const delay_1 = require("delay"); const log_1 = require("log"); /** @@ -579,6 +580,7 @@ class Devices { return true; } } +exports.Devices = Devices; module.exports = function (arduino, settings, mainWindow, cam) { return new Devices(arduino, settings, mainWindow, cam); }; diff --git a/app/lib/devices/index.js.map b/app/lib/devices/index.js.map index 2e9c3d8..369d819 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,6BAA0B;AAI1B;;;;IAII;AAEJ,MAAM,OAAO;IAYZ;;;QAGI;IACJ,YAAa,OAAiB,EAAE,QAAmB,EAAE,UAAgB,EAAE,GAAS;QAbzE,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,IAAA,SAAG,EAAC,EAAE,KAAK,EAAG,SAAS,EAAE,CAAC,CAAA;QAC3C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;QACvC,IAA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AAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QAGpC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAA;QAEpB,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QAE3B,OAAO,IAAI,CAAA;IACZ,CAAC;CAMD;AA9jBD,0BA8jBC;AAED,MAAM,CAAC,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/display/index.d.ts b/app/lib/display/index.d.ts index cb0ff5c..7e9a46a 100644 --- a/app/lib/display/index.d.ts +++ b/app/lib/display/index.d.ts @@ -1 +1,17 @@ -export {}; +export declare class Display { + private platform; + private displays; + private display; + private tmpdir; + private wv; + constructor(sys: any); + open(): Promise; + show(src: string): Promise; + showPath(pathStr: string): Promise; + hide(): void; + close(): Promise; + focus(): Promise; + field(ratio: number): Promise; + meter(): Promise; + change(id: any): void; +} diff --git a/app/lib/display/index.js b/app/lib/display/index.js index 9572b81..c0408b5 100644 --- a/app/lib/display/index.js +++ b/app/lib/display/index.js @@ -1,5 +1,6 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); +exports.Display = void 0; /** * @module display * Provides features for displaying a full screen display of images for the digital module. @@ -8,7 +9,7 @@ const path_1 = require("path"); const url_1 = require("url"); const delay_1 = require("delay"); const log_1 = require("log"); -const { BrowserWindow } = require('electron'); +const electron_1 = require("electron"); class WebView { constructor(platform, display) { this.opened = false; @@ -37,7 +38,7 @@ class WebView { prefs.x = display.x + 50; prefs.y = display.y + 50; } - this.digitalWindow = new BrowserWindow(prefs); + this.digitalWindow = new electron_1.BrowserWindow(prefs); require('@electron/remote/main').enable(this.digitalWindow.webContents); this.digitalWindow.loadURL(pageUrl); if (process.argv.indexOf('-d') !== -1 || process.argv.indexOf('--dev') !== -1) { @@ -192,6 +193,7 @@ class Display { }); } } +exports.Display = Display; module.exports = function (sys) { return new Display(sys); }; diff --git a/app/lib/display/index.js.map b/app/lib/display/index.js.map index b3dd06a..fc68ce9 100644 --- a/app/lib/display/index.js.map +++ b/app/lib/display/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/display/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;IAGI;AAEJ,+BAAoE;AACpE,6BAA0C;AAC1C,iCAA8B;AAC9B,6BAA0B;AAG1B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAE9C,MAAM,OAAO;IAUZ,YAAa,QAAiB,EAAE,OAAa;QARtC,WAAM,GAAa,KAAK,CAAC;QACzB,YAAO,GAAa,KAAK,CAAC;QAGzB,aAAQ,GAAS,EAAE,CAAC;QAK3B,MAAM,KAAK,GAAS;YACnB,cAAc,EAAE;gBACV,eAAe,EAAE,IAAI;gBACrB,2BAA2B,EAAE,KAAK;gBAClC,kBAAkB,EAAE,IAAI;gBACxB,gBAAgB,EAAE,KAAK;aACzB;YACJ,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG;YACX,QAAQ,EAAG,GAAG;YACd,SAAS,EAAG,GAAG,CAAA,GAAG;YAClB,2DAA2D;SAC3D,CAAA;QACD,MAAM,QAAQ,GAAY,IAAA,gBAAa,EAAC,IAAA,WAAQ,EAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC,CAAA;QAClF,MAAM,OAAO,GAAa,IAAA,YAAS,EAAC;YACnC,QAAQ,EAAG,QAAQ;YACnB,QAAQ,EAAG,OAAO;SAClB,CAAC,CAAC;QAEH,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACrB,KAAK,CAAC,CAAC,GAAG,OAAO,CA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EAAE,CAAC,IAAI,EAAE,CAAC;SACrB;IACF,CAAC;IACM,KAAK,CAAC,IAAI,CAAE,GAAY;QAC9B,MAAM,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IACM,KAAK,CAAC,QAAQ,CAAE,OAAgB;QACtC,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IACM,IAAI;IAEX,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAA;IAC7B,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IACM,KAAK,CAAC,KAAK,CAAG,KAAc;QAClC,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IACM,KAAK,CAAC,KAAK;QACjB,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IACM,MAAM,CAAE,EAAQ;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAa,EAAE,EAAE;YACnD,IAAI,OAAO,CAAC,EAAE,IAAI,EAAE;gBAAE,OAAO,IAAI,CAAC;QACnC,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AAlDD,0BAkDC;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,GAAS;IACnC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,CAAA;AACxB,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/exec/index.js.map b/app/lib/exec/index.js.map index ed9bf9f..9c63cc5 100644 --- a/app/lib/exec/index.js.map +++ b/app/lib/exec/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ex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AE,IAAI,EACjC,CAAC,GAAW,EAAE,MAAe,EAAE,MAAc,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;YAC7E,MAAM;YACN,MAAM;SACN,CAAC,CAAC,CAAC;QACC,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAClC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAClC;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAA"} \ No newline at end of file diff --git a/app/lib/exit/index.js b/app/lib/exit/index.js index aef14d4..4cb01ac 100644 --- a/app/lib/exit/index.js +++ b/app/lib/exit/index.js @@ -16,5 +16,5 @@ function exit(msg, code = 0) { process.exit(code); } } -module.exports.exit = exit; +module.exports = { exit }; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/app/lib/exit/index.js.map b/app/lib/exit/index.js.map index 32d707c..4484961 100644 --- a/app/lib/exit/index.js.map +++ b/app/lib/exit/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exit/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb;;;;;;IAMI;AAEJ,SAAS,IAAI,CAAE,GAAY,EAAE,OAAgB,CAAC;IAC7C,IAAI,IAAI,KAAK,CAAC,EAAE;QACf,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjB,OAAO,CAAC,IAAI,EAAE,CAAC;KACf;SAAM;QACN,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACnB;AACF,CAAC;AAED,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exit/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb;;;;;;IAMI;AAEJ,SAAS,IAAI,CAAE,GAAY,EAAE,OAAgB,CAAC;IAC7C,IAAI,IAAI,KAAK,CAAC,EAAE;QACf,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjB,OAAO,CAAC,IAAI,EAAE,CAAC;KACf;SAAM;QACN,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACnB;AACF,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,EAAE,IAAI,EAAE,CAAC"} \ No newline at end of file diff --git a/app/lib/ffmpeg/index.d.ts b/app/lib/ffmpeg/index.d.ts index cb0ff5c..bf393e1 100644 --- a/app/lib/ffmpeg/index.d.ts +++ b/app/lib/ffmpeg/index.d.ts @@ -1 +1,84 @@ -export {}; +import type { FilmOutState } from 'filmout'; +interface StdErr { + frame: number; + fps: number; + time: string; + speed: number; + size: string; + remaining?: number; + progress?: number; + estimated?: number; +} +/** @class FFMPEG **/ +export declare class FFMPEG { + private bin; + private log; + private id; + private TMPDIR; + private child; + onProgress: Function; + /** + * @constructor + * Creates an ffmpeg class + * + * @param {object} sys System object to be used to get temp directory + **/ + constructor(sys: any); + /** + * Async method to call async functions from constructor + **/ + init(): Promise; + /** + * Add padding to a number to 5 places. Return a string. + * + * @param {integer} i Integer to pad + * + * @returns {string} Padded string + **/ + private padded_frame; + /** + * Parse the stderr output of ffmpeg + * + * @param {string} line Stderr line + **/ + private parseStderr; + /** + * Render a single frame from a video or image to a png. + * + * @param {object} state State object containing file data + * @param {object} light Object containing color information for frame + * + * @returns {string} Path of frame + **/ + frame(state: FilmOutState, light: any): Promise; + /** + * Render all frames in a video to the temp directory. + * Not in use. + * + * @param {string} video Path to video + * @param {object} obj Not sure + * + * @returns {?} + **/ + frames(state: FilmOutState): Promise; + cancel(): void; + /** + * Clears a specific frame from the tmp directory + * + * @param {integer} frame Integer of frame to clear + * + * @returns {boolean} True if successful, false if not + **/ + clear(state: any): Promise; + /** + * Deletes all frames in temp directory. + * + **/ + clearAll(): Promise; + /** + * Checks if mcopy temp directory exists. If it doesn't, + * creates it. + **/ + private checkDir; +} +export type { StdErr }; diff --git a/app/lib/ffmpeg/index.js b/app/lib/ffmpeg/index.js index 7097133..28cdd02 100644 --- a/app/lib/ffmpeg/index.js +++ b/app/lib/ffmpeg/index.js @@ -1,5 +1,6 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); +exports.FFMPEG = void 0; /** @module ffmpeg **/ const path_1 = require("path"); const fs_extra_1 = require("fs-extra"); @@ -350,6 +351,7 @@ class FFMPEG { } } } +exports.FFMPEG = FFMPEG; module.exports = (sys) => { return new FFMPEG(sys); }; diff --git a/app/lib/ffmpeg/index.js.map b/app/lib/ffmpeg/index.js.map index 5b7f739..ef5a26c 100644 --- a/app/lib/ffmpeg/index.js.map +++ b/app/lib/ffmpeg/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ffmpeg/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,sBAAsB;AAEtB,+BAA4B;AAC5B,uCAA0D;AAC1D,+BAA4B;AAC5B,iDAAsC;AACtC,6BAA0B;AA0B1B,KAAK,UAAU,UAAU,CAAE,GAAY,EAAE,IAAe;IACvD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAkB,EAAE,MAAiB,EAAE,EAAE;QACtD,MAAM,KAAK,GAAG,IAAA,qBAAK,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC/B,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAa,EAAE,E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C;iBACpB;YACF,CAAC,CAAC,CAAC;SACH;IACF,CAAC;IAED;;;QAGI;IACI,KAAK,CAAC,QAAQ;QACrB,IAAI,UAAoB,CAAC;QACzB,IAAI;YACH,UAAU,GAAG,MAAM,IAAA,iBAAM,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACvC;QAAC,OAAO,GAAG,EAAE;YACb,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,4BAA4B,EAAE,GAAG,CAAC,CAAC;SAClD;QAED,IAAI,CAAC,UAAU,EAAE;YAChB,IAAI;gBACH,MAAM,IAAA,gBAAK,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACzB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;aAC/C;YAAC,OAAO,GAAG,EAAE;gBACb,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,wBAAwB,EAAE,GAAG,CAAC,CAAC;aAC9C;SACD;QACD,IAAI;YACH,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;SACtB;QAAC,OAAO,GAAG,EAAE;YACb,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACpB;IACF,CAAC;CACD;AAhWD,wBAgWC;AAGD,MAAM,CAAC,OAAO,GAAG,CAAC,GAAS,EAAE,EAAE;IAC9B,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/ffprobe/index.d.ts b/app/lib/ffprobe/index.d.ts index cb0ff5c..9f28dfc 100644 --- a/app/lib/ffprobe/index.d.ts +++ b/app/lib/ffprobe/index.d.ts @@ -1 +1,28 @@ -export {}; +export declare class FFPROBE { + private bin; + private log; + constructor(sys: any); + private init; + /** + * Parse the fps entry into a float representing the fps of a video + **/ + private parseFps; + /** + * Get info on a video in json format. Use for filmout. + * + * @param {string} video Path to video + * + * @returns {object} Video info in an object + **/ + info(video: string): Promise; + /** + * Count the number of frames in the video using one of two methods. + * The first uses -select_streams and is very fast. The second uses + * -count_frames and is VERY slow. + * + * @param {string} video Path to video + * + * @returns {integer} Number of frames in video + **/ + frames(video: string): Promise; +} diff --git a/app/lib/ffprobe/index.js b/app/lib/ffprobe/index.js index 087d13a..319502f 100644 --- a/app/lib/ffprobe/index.js +++ b/app/lib/ffprobe/index.js @@ -1,12 +1,11 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); +exports.FFPROBE = void 0; /** @module FFPROBE **/ const fs_extra_1 = require("fs-extra"); const path_1 = require("path"); const exec_1 = require("exec"); const log_1 = require("log"); -//const spawn = require('spawn'); -//const exit = require('exit'); class FFPROBE { constructor(sys) { this.bin = sys.deps.ffprobe; @@ -140,6 +139,7 @@ class FFPROBE { return frames; } } +exports.FFPROBE = FFPROBE; /* function map (obj : any) { console.dir(obj); diff --git a/app/lib/ffprobe/index.js.map b/app/lib/ffprobe/index.js.map index 4e71606..35211b2 100644 --- a/app/lib/ffprobe/index.js.map +++ b/app/lib/ffprobe/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ffprobe/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,uBAAuB;AAEvB,uCAAkC;AAClC,+BAA+B;AAC/B,+BAA4B;AAC5B,6BAA0B;AAE1B,iCAAiC;AACjC,+BAA+B;AAE/B,MAAM,OAAO;IAGZ,YAAa,GAAS;QACrB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;IAEO,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,GAAG,GAAG,MAAM,IAAA,SAAG,EAAC,EAAE,KAAK,EAAG,SAAS,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED;;QAEI;IACI,QAAQ,CAAE,MAAe;QAChC,IAAI,GAAG,GAAY,IAAI,CAAC;QACxB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B;QAAC,OAAO,GAAG,EAAE;YACb,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACpB,OAAO,KAAK,CAAC;SACb;QAED,IAAI;YACH,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;SAC9B;QAAC,OAAO,GAAG,EAAE;YACb,OAAO,GAAG,CAAC,MAAM,CAAC;SAClB;QAED,OAAO,MAAM,CAAC;IACf,CAAC;CACD;AA1ID,0BA0IC;AAED;;;;EAIE;AAEF,MAAM,CAAC,OAAO,GAAG,CAAC,GAAS,EAAE,EAAE;IAC9B,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/filmout/index.d.ts b/app/lib/filmout/index.d.ts index cb0ff5c..3117eb9 100644 --- a/app/lib/filmout/index.d.ts +++ b/app/lib/filmout/index.d.ts @@ -1 +1,171 @@ -export {}; +import type { Server } from 'server'; +import type { Display } from 'display'; +import type { Light } from 'light'; +import type { FFMPEG } from 'ffmpeg'; +import type { FFPROBE } from 'ffprobe'; +interface FilmOutState { + hash: string; + frame: number; + frames: number; + fps: number; + seconds: number; + still: boolean; + path: string; + fileName: string; + directory: boolean; + info: any; + dir: boolean; + enabled: boolean; + files: string[]; +} +/** + * @module FilmOut + **/ +export declare class FilmOut { + private id; + private videoExtensions; + private stillExtensions; + private sequenceExtensions; + private gifExtension; + state: FilmOutState; + private ffmpeg; + private ffprobe; + private light; + private ipc; + private ui; + private log; + display: Display; + server: Server; + /** + * @constructor + * Builds FilmOut class with display, ffmpeg, ffprobe, ui and light as internal properties. + * + * @param {object} display Display object for showing frames + * @param {object} ffmpeg FFMPEG wrapper + * @param {object} ffprobe FFPROBE wrapper for file info + * @param {object} ui Electron ui object + * @param {object} light Light device object + **/ + constructor(display: Display, server: Server, ffmpeg: FFMPEG, ffprobe: FFPROBE, ui: any, light: Light); + /** + * Async function for requiring log, ipcMain and bind events. + **/ + private init; + /** + * + **/ + private listen; + /** + * Create a hash of a string. + * + * @param {string} data Data to produce hash of + */ + private hash; + /** + * Sets filmout direction. + * + * @param {boolean} dir Direction of filmout + **/ + set(dir: boolean): void; + /** + * Moves filmout a frame at a time. + * + * @returns {number} Time since start + **/ + move(): Promise; + /** + * Begin the process of exporting single frames from the video for display. + **/ + start(): Promise; + /** + * Ends the filmout process and closes the display. + **/ + end(): Promise; + /** + * Use a video file as a film out source on "projector" + * + * @param {object} evt Original connect event + * @param {object} arg Arguments from ipc message + * + * @returns {boolean} Success state + **/ + onConnect(evt: any, arg: any): Promise; + /** + * Pre-export all frames from video for display. + * + * @param {object} evt IPC event + * @param {object} arg IPC args + * + * @returns {any} UI send call + */ + onPreExport(evt: Event, arg: any): Promise; + /** + * Return true if gif is animated, false if it is a still + * + * @param {string} pathStr Path to gif to check + * + * @returns {boolean} Whether or not gif is animated + **/ + isGifAnimated(pathStr: string): Promise; + /** + * Return information on a still image using the Jimp module + * + * @param {string} pathStr Path to gif to check + * + * @returns {object} Info about still from sharp + **/ + stillInfo(pathStr: string): Promise; + /** + * Return information on the first still image found in a + * directory using the Jimp module. + * + * @param {array} images List of image paths + * + * @returns {object} Info about first image + **/ + dirInfo(images: string[]): Promise; + /** + * Returns a list of images within a directory, filtered + * for supported types and sorted. + * + * @param {string} pathStr Path to directory + * + * @returns {array} Array of image paths + **/ + dirList(pathStr: string): Promise; + /** + * Preview a frame from the selected video. + * + * @param {object} evt Original event + * @param {object} arg Arguments from message + **/ + previewFrame(evt: any, arg: any): Promise; + /** + * Open a single frame in a display window to preview filmout. + * + * @param {object} evt Original event + * @param {object} arg Arguments from message + **/ + preview(evt: any, arg: any): Promise; + /** + * + **/ + focus(evt: any, arg: any): Promise; + /** + * + **/ + field(evt: any, arg: any): Promise; + /** + * + **/ + meter(evt: any, arg: any): Promise; + /** + * + **/ + close(evt: any, arg: any): Promise; + /** + * + **/ + onDisplay(evt: any, arg: any): void; +} +export type { FilmOutState }; diff --git a/app/lib/filmout/index.js b/app/lib/filmout/index.js index 072cd3e..a7877b7 100644 --- a/app/lib/filmout/index.js +++ b/app/lib/filmout/index.js @@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.FilmOut = void 0; const animated_gif_detector_1 = __importDefault(require("animated-gif-detector")); const path_1 = require("path"); const fs_extra_1 = require("fs-extra"); @@ -31,8 +32,11 @@ class FilmOut { this.sequenceExtensions = ['.png', '.jpg', '.jpeg']; this.gifExtension = '.gif'; this.state = { + hash: null, frame: 0, frames: 0, + fps: 24, + seconds: 0, still: false, path: null, fileName: null, @@ -498,6 +502,7 @@ class FilmOut { this.log.info(`Changing the display to ${arg.display}`); } } +exports.FilmOut = FilmOut; module.exports = (display, server, ffmpeg, ffprobe, ui, light) => { return new FilmOut(display, server, ffmpeg, ffprobe, ui, light); }; diff --git a/app/lib/filmout/index.js.map b/app/lib/filmout/index.js.map index 279aec8..9752983 100644 --- a/app/lib/filmout/index.js.map +++ b/app/lib/filmout/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/filmout/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;AAEb,kFAA6D;AAC7D,+BAAqC;AACrC,uCAAoD;AACpD,iCAA8B;AAC9B,mCAAoC;AAEpC,kDAA0B;AAC1B,6BAA0B;AAG1B;;IAEI;AAEJ,MAAM,OAAO;IA0BZ;;;;;;;;;QASI;IACJ,YAAa,OAAa,EAAE,MAAY,EAAE,MAAY,EAAE,OAAa,EAAE,EAAQ,EAAE,KAAW;QAnCpF,OAAE,GAAY,SAAS,CAAC;QACxB,oBAAe,GAAe,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAChF,oBAAe,GAAc,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAA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AAC;SAC3C;IACF,CAAC;IACD;;QAEI;IACJ,KAAK,CAAC,KAAK,CAAE,GAAS,EAAE,GAAS;QAChC,IAAI;YACH,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;gBACtC,OAAM;aACN;YACD,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAC1B,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;SAE3B;QAAC,OAAO,GAAG,EAAE;YACb,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;SAC3C;IACF,CAAC;IACD;;QAEI;IACJ,SAAS,CAAE,GAAS,EAAE,GAAS;QAC9B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACjC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,2BAA2B,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IACzD,CAAC;CACD;AA1fD,0BA0fC;AAED,MAAM,CAAC,OAAO,GAAG,CAAC,OAAa,EAAE,MAAY,EAAE,MAAY,EAAE,OAAa,EAAE,EAAQ,EAAE,KAAW,EAAE,EAAE;IACpG,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;AACjE,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/frame/index.d.ts b/app/lib/frame/index.d.ts index 11935c4..2b01486 100644 --- a/app/lib/frame/index.d.ts +++ b/app/lib/frame/index.d.ts @@ -12,4 +12,4 @@ export default class Frame { static solidColor(width: number, height: number, color: RGBA): Promise; static blend(inPath: any, color: RGBA, imagePath: string): Promise; } -export {}; +export type { RGBA }; diff --git a/app/lib/intval/index.d.ts b/app/lib/intval/index.d.ts index 339fd3f..4c59f0a 100644 --- a/app/lib/intval/index.d.ts +++ b/app/lib/intval/index.d.ts @@ -1,9 +1,8 @@ export declare class Intval { private _baseUrl; - private req; constructor(url: string); - move(): Promise; - setDir(dir: boolean): Promise; - setExposure(exposure: number, cb: Function): Promise; + move(): Promise; + setDir(dir: boolean): Promise; + setExposure(exposure: number, cb: Function): Promise; connect(cb: Function): void; } diff --git a/app/lib/intval/index.js b/app/lib/intval/index.js index 9273067..90fd6d4 100644 --- a/app/lib/intval/index.js +++ b/app/lib/intval/index.js @@ -1,17 +1,40 @@ 'use strict'; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); exports.Intval = void 0; +const request = __importStar(require("request")); class Intval { constructor(url) { this._baseUrl = `http://${url}`; - this.req = require('request'); } async move() { return new Promise((resolve, reject) => { const timeStart = +new Date(); const url = `${this._baseUrl}/frame`; //console.log(url) - return this.req(url, (err, res, body) => { + return request(url, (err, res, body) => { let ms = (+new Date()) - timeStart; if (err) { return reject(err); @@ -25,7 +48,7 @@ class Intval { const timeStart = +new Date(); const url = `${this._baseUrl}/dir?dir=${dir}`; //console.log(url) - return this.req(url, (err, res, body) => { + return request(url, (err, res, body) => { let ms = (+new Date()) - timeStart; if (err) { return reject(err); @@ -38,7 +61,7 @@ class Intval { return new Promise((resolve, reject) => { const timeStart = +new Date(); const url = `${this._baseUrl}/exposure?exposure=${exposure}`; - return this.req(url, (err, res, body) => { + return request(url, (err, res, body) => { let ms = (+new Date()) - timeStart; if (err) { return reject(err); @@ -55,7 +78,7 @@ class Intval { uri: url, timeout: 5000 }; - this.req(opts, (err, res, body) => { + request(opts, (err, res, body) => { let ms = (+new Date()) - timeStart; if (err) { return cb(err, ms); @@ -65,5 +88,5 @@ class Intval { } } exports.Intval = Intval; -module.exports.Intval = Intval; +module.exports = { Intval }; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/app/lib/intval/index.js.map b/app/lib/intval/index.js.map index 86e50c0..9663458 100644 --- a/app/lib/intval/index.js.map +++ b/app/lib/intval/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/intval/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;AAEZ,MAAa,MAAM;IAGlB,YAAa,GAAY;QACxB,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAA;QAC/B,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;IAC9B,CAAC;IACM,KAAK,CAAC,IAAI;QAChB,OAAO,IAAI,OAAO,CAAE,CAAC,OAAa,EAAE,MAAY,EAAE,EAAE;YACnD,MAAM,SAAS,GAAY,CAAC,IAAI,IAAI,EAAE,CAAA;YACtC,MAAM,GAAG,GAAY,GAAG,IAAI,CAAC,QAAQ,QAAQ,CAAA;YAC7C,kBAAkB;YAClB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAW,EAAE,GAAS,EAAE,IAAa,EAAE,EAAE;gBAC9D,IAAI,EAAE,GAAY,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,GAAG,SAAS,CAAA;gBAC3C,IAAI,GAAG,EAAE;oBACR,OAAO,MAAM,CAAC,GAAG,CAAC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AAE;gBAC7D,IAAI,EAAE,GAAY,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,GAAG,SAAS,CAAA;gBAC3C,IAAI,GAAG,EAAE;oBACR,OAAO,MAAM,CAAC,GAAG,CAAC,CAAA;iBAClB;gBACD,OAAO,OAAO,CAAC,EAAE,CAAC,CAAA;YACnB,CAAC,CAAC,CAAA;QACH,CAAC,CAAC,CAAA;IACH,CAAC;IACM,OAAO,CAAE,EAAa;QAC5B,MAAM,SAAS,GAAY,CAAC,IAAI,IAAI,EAAE,CAAA;QACtC,MAAM,GAAG,GAAY,GAAG,IAAI,CAAC,QAAQ,SAAS,CAAA;QAC9C,MAAM,IAAI,GAAS;YAClB,MAAM,EAAG,KAAK;YACd,GAAG,EAAG,GAAG;YACT,OAAO,EAAE,IAAI;SACb,CAAA;QAED,OAAO,CAAC,IAAI,EAAE,CAAC,GAAW,EAAE,GAAS,EAAE,IAAa,EAAE,EAAE;YACvD,IAAI,EAAE,GAAY,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,GAAG,SAAS,CAAA;YAC3C,IAAI,GAAG,EAAE;gBACR,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;aAClB;YACD,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAA;QACnB,CAAC,CAAC,CAAA;IACH,CAAC;CACD;AAhED,wBAgEC;AAED,MAAM,CAAC,OAAO,GAAG,EAAE,MAAM,EAAE,CAAA"} \ No newline at end of file diff --git a/app/lib/light/index.d.ts b/app/lib/light/index.d.ts index cb0ff5c..b8c707b 100644 --- a/app/lib/light/index.d.ts +++ b/app/lib/light/index.d.ts @@ -1 +1,35 @@ -export {}; +import type { Arduino } from 'arduino'; +export declare class Light { + state: any; + private arduino; + private cfg; + private ui; + private log; + private ipc; + private enabled; + private id; + /** + * + **/ + constructor(arduino: Arduino, cfg: any, ui: any); + /** + * + **/ + private init; + /** + * + **/ + private listen; + /** + * + **/ + private listener; + /** + * + **/ + set(rgb: number[], id: string, on?: boolean): Promise; + /** + * + **/ + private end; +} diff --git a/app/lib/light/index.js b/app/lib/light/index.js index d66d611..d8cb73e 100644 --- a/app/lib/light/index.js +++ b/app/lib/light/index.js @@ -1,5 +1,6 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); +exports.Light = void 0; const delay_1 = require("delay"); const log_1 = require("log"); class Light { @@ -91,6 +92,7 @@ class Light { return res; } } +exports.Light = Light; module.exports = function (arduino, cfg, ui) { return new Light(arduino, cfg, ui); }; diff --git a/app/lib/light/index.js.map b/app/lib/light/index.js.map index c1f2b03..87daa23 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,6BAA0B;AAG1B,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,IAAA,SAAG,EAAC,EAAE,KAAK,EAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;QACvC,IAAI,CAAC,MAAM,EAAE,CAAC;IACf,CAAC;IAED;;QAEI;IAC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I,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;AAjGD,sBAiGC;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/mscript/index.d.ts b/app/lib/mscript/index.d.ts index f16bc9f..25275bd 100644 --- a/app/lib/mscript/index.d.ts +++ b/app/lib/mscript/index.d.ts @@ -246,4 +246,4 @@ export default class Mscript { **/ contains(arr: string[], arr2: string[]): boolean; } -export {}; +export type { RGB }; diff --git a/app/lib/processing/index.d.ts b/app/lib/processing/index.d.ts index cb0ff5c..6fa7476 100644 --- a/app/lib/processing/index.d.ts +++ b/app/lib/processing/index.d.ts @@ -1 +1,6 @@ -export {}; +export declare class Processing { + private _baseUrl; + constructor(url: string); + move(): Promise; + setDir(dir: boolean): Promise; +} diff --git a/app/lib/processing/index.js b/app/lib/processing/index.js index 3187937..938525d 100644 --- a/app/lib/processing/index.js +++ b/app/lib/processing/index.js @@ -1,5 +1,6 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); +exports.Processing = void 0; const exec_1 = require("exec"); class Processing { constructor(url) { @@ -29,5 +30,6 @@ class Processing { }); } } -module.exports.Processing = Processing; +exports.Processing = Processing; +module.exports = { Processing }; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/app/lib/processing/index.js.map b/app/lib/processing/index.js.map index 448c954..c33596c 100644 --- a/app/lib/processing/index.js.map +++ b/app/lib/processing/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/processing/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,+BAA4B;AAE5B,MAAM,UAAU;IAEf,YAAa,GAAY;QACxB,IAAI,CAAC,QAAQ,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;IAClG,CAAC;IAEM,KAAK,CAAC,IAAI;QAChB,OAAO,IAAI,OAAO,CAAE,KAAK,EAAE,OAAa,EAAE,MAAY,EAAE,EAAE;YACzD,MAAM,SAAS,GAAY,CAAC,IAAI,IAAI,EAAE,CAAA;YACtC,MAAM,GAAG,GAAY,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAA;YACvC,MAAM,GAAG,GAAY,kBAAkB,GAAG,EAAE,CAAA;YAC5C,IAAI,GAAY,CAAA;YAChB,IAAI,EAAW,CAAA;YACf,kBAAkB;YAClB,IAAI;gBACH,GAAG,GAAG,MAAM,IAAA,WAAI,EAAC,GAAG,CAAC,CAAA;aACrB;YAAC,OAAO,GAAG,EAAE;gBACb,OAAO,MAAM,CAAC,GAAG,CAAC,CAAA;aAClB;YACD,EAAE,GAAG,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,GAAG,SAAS,CAAA;YAC9B,OAAO,OAAO,CAAC,EAAE,CAAC,CAAA;QACnB,CAAC,CAAC,CAAA;IACH,CAAC;IACM,KAAK,CAAC,MAAM,CAAE,GAAa;QACjC,OAAO,I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a;QACjC,OAAO,IAAI,OAAO,CAAE,CAAC,OAAkB,EAAE,MAAiB,EAAE,EAAE;YAC7D,OAAO,OAAO,CAAC,CAAC,CAAC,CAAA;QAClB,CAAC,CAAC,CAAA;IACH,CAAC;CACD;AA5BD,gCA4BC;AAED,MAAM,CAAC,OAAO,GAAG,EAAE,UAAU,EAAE,CAAA"} \ No newline at end of file diff --git a/app/lib/proj/index.d.ts b/app/lib/proj/index.d.ts index ae6360f..0090ad3 100644 --- a/app/lib/proj/index.d.ts +++ b/app/lib/proj/index.d.ts @@ -1,2 +1,47 @@ /** class representing the Projector features **/ -export {}; +import type { Arduino } from 'arduino'; +import type { FilmOut } from 'filmout'; +interface ProjectorState { + pos: number; + dir: boolean; +} +export declare class Projector { + state: ProjectorState; + arduino: Arduino; + private log; + private cfg; + private ui; + private ipc; + filmout: FilmOut; + private id; + /** + * + **/ + constructor(arduino: Arduino, cfg: any, ui: any, filmout: any, second?: boolean); + /** + * + **/ + private init; + /** + * + **/ + private listen; + /** + * + **/ + set(dir: boolean, id: string): Promise; + /** + * + **/ + move(id: string): Promise; + both(id: string): Promise; + /** + * + **/ + private listener; + /** + * + **/ + end(cmd: string, id: string, ms: number): Promise; +} +export type { ProjectorState }; diff --git a/app/lib/proj/index.js b/app/lib/proj/index.js index a0b9be5..bba77b5 100644 --- a/app/lib/proj/index.js +++ b/app/lib/proj/index.js @@ -1,6 +1,7 @@ "use strict"; /** class representing the Projector features **/ Object.defineProperty(exports, "__esModule", { value: true }); +exports.Projector = void 0; const log_1 = require("log"); class Projector { /** @@ -56,16 +57,15 @@ class Projector { ms = await this.arduino.send(this.id, cmd); } catch (err) { - this.log.error(`Error setting ${this.id} direction`, err); + this.log.error(`Error setting ${this.id} direction: ${id}`, err); } } - console.dir(ms); return await this.end(cmd, id, ms); } /** * **/ - async move(frame, id) { + async move(id) { const cmd = this.cfg.arduino.cmd[this.id]; let ms; if (this.filmout.state.enabled) { @@ -81,20 +81,20 @@ class Projector { ms = await this.arduino.send(this.id, cmd); } catch (err) { - this.log.error(`Error moving ${this.id}`, err); + this.log.error(`Error moving ${this.id}: ${id}`, err); } } //this.log.info('Projector move time', { ms }); return await this.end(cmd, id, ms); } - async both(frame, id) { + async both(id) { const cmd = this.cfg.arduino.cmd[this.id + 's']; let ms; try { ms = await this.arduino.send(this.id, cmd); } catch (err) { - this.log.error(`Error moving ${this.id}`, err); + this.log.error(`Error moving ${this.id}: ${id}`, err); } //this.log.info('Projectors move time', { ms }); return await this.end(cmd, id, ms); @@ -111,12 +111,12 @@ class Projector { this.log.error(err); } } - else if (typeof arg.frame !== 'undefined') { + else if (typeof arg.move !== 'undefined') { try { - await this.move(arg.frame, arg.id); + await this.move(arg.id); } catch (err) { - this.log.error(err); + this.log.error(`Error moving ${this.id}: ${arg.id}`, err); } } else if (typeof arg.val !== 'undefined') { @@ -170,6 +170,7 @@ class Projector { return await this.ui.send(this.id, { cmd, id, ms }); } } +exports.Projector = Projector; module.exports = function (arduino, cfg, ui, filmout, second) { return new Projector(arduino, cfg, ui, filmout, second); }; diff --git a/app/lib/proj/index.js.map b/app/lib/proj/index.js.map index dd6bfe1..493d0f3 100644 --- a/app/lib/proj/index.js.map +++ b/app/lib/proj/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/proj/index.ts"],"names":[],"mappings":";AAAA,iDAAiD;;AAEjD,6BAA0B;AAG1B,MAAM,SAAS;IAad;;QAEI;IACJ,YAAa,OAAiB,EAAE,GAAS,EAAE,EAAQ,EAAE,OAAa,EAAE,SAAmB,KAAK;QAfpF,UAAK,GAAS;YACrB,GAAG,EAAG,CAAC;YACP,GAAG,EAAG,IAAI;SACV,CAAC;QACM,YAAO,GAAa,IAAI,CAAC;QAMzB,OAAE,GAAY,WAAW,CAAC;QAMjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,EAAE,GAAG,EAAE,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,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;IACpD,CAAC;CACD;AA/JD,8BA+JC;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,OAAiB,EAAE,GAAS,EAAE,EAAQ,EAAE,OAAa,EAAE,MAAgB;IACjG,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;AACxD,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/sequencer/index.d.ts b/app/lib/sequencer/index.d.ts index cb0ff5c..ceabb0c 100644 --- a/app/lib/sequencer/index.d.ts +++ b/app/lib/sequencer/index.d.ts @@ -1 +1,100 @@ -export {}; +import { Commands } from 'cmd'; +export declare class Sequencer { + private running; + private paused; + private grid; + private gridLoops; + private arr; + private loops; + private cfg; + private cmd; + private CMDS; + private ipc; + private ui; + private log; + private id; + private alerted; + private psbId; + /** + * @constructor + * Create a new sequencer and assign command and UI as private sub-classes + * + * @param {object} cfg Configuration object + * @param {object} cmd Shared command class + * @param {object} ui Electron UI, browser window + **/ + constructor(cfg: any, cmd: Commands, ui: any); + /** + * Take configuration object and assign all commands as keys + * in the internal CMDS object. + * + * @param {object} obj Configuration object + **/ + private cmds; + /** + * Initialize the class by requiring ipcMain from electron + * and creating logger. + * + **/ + private init; + /** + * Bind ipc listener to channel 'sequencer' or current id of + * class. + **/ + private listen; + /** + * Listener callback function. Called whenever ipc + * message is sent to channel 'sequencer'. + * + * @param {object} event IPC message event + * @param {object} arg Arguments provided in message + **/ + private listener; + /** + * Sets the value of the loops in the grid sequence + * to value sent by UI in ipc message. + * + * @param {integer} count Number of loops to set grid sequence to + **/ + setLoops(count: number): void; + /** + * Sets multiple steps at once + * + * @param {array} steps Array of steps to set or update + **/ + setSteps(steps: any[]): void; + /** + * Resets multiple steps to default 'undefined' state + * + * @param {array} steps Array containing the x location of steps to unset + **/ + unsetSteps(steps: number[]): void; + /** + * Starts a sequence with the existing grid sequence, + * or if one is provided in the arg object, starts + * that sequence. + * + * @param {object} arg Arguments from ipc message + **/ + start(arg: any): Promise; + /** + * Pauses sequence from UI. + **/ + pause(): void; + /** + * Stops the sequence + **/ + stop(): void; + /** + * Execute command @ step x. Wrapper with try catch. + * + * @param {integer} x Step to execute command at + **/ + private step; + /** + * Locate step @ position x and execute the command. + * + * @param {integer} x Step to execute command at + **/ + private cmdExec; +} diff --git a/app/lib/sequencer/index.js b/app/lib/sequencer/index.js index 3dbeb22..8853037 100644 --- a/app/lib/sequencer/index.js +++ b/app/lib/sequencer/index.js @@ -1,11 +1,9 @@ 'use strict'; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", { value: true }); +exports.Sequencer = void 0; const log_1 = require("log"); const electron_1 = require("electron"); -const delay_1 = __importDefault(require("delay")); +const delay_1 = require("delay"); /** @module lib/sequencer **/ let seq; class Sequencer { @@ -164,7 +162,7 @@ class Sequencer { } //UI initiates pause, not planned while (this.paused) { - await (0, delay_1.default)(42); + await (0, delay_1.delay)(42); } if (typeof this.arr[y] === 'undefined') { continue; @@ -234,9 +232,11 @@ class Sequencer { const cmdOriginal = this.arr[x].cmd; const cmd = this.CMDS[cmdOriginal]; this.log.info(`CMD: '${cmdOriginal}' -> ${cmd}`); + //@ts-ignore return await this.cmd[cmd](this.arr[x]); } } +exports.Sequencer = Sequencer; module.exports = function (cfg, cmd, ui) { return new Sequencer(cfg, cmd, ui); }; diff --git a/app/lib/sequencer/index.js.map b/app/lib/sequencer/index.js.map index d3bb1da..d4723e7 100644 --- a/app/lib/sequencer/index.js.map +++ b/app/lib/sequencer/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sequencer/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;AAGb,6BAA0B;A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AAO,CAAC,KAAK,CAAC,OAAO,KAAK,IAAI,EAAE;YACjD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;SACtC;QACD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,IAAI,CAAC,KAAK,EAAE;YACf,2BAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAClC;QACD,QAAQ;IAET,CAAC;IAED;;;;QAII;IACI,KAAK,CAAC,IAAI,CAAG,CAAS;QAC7B,IAAI;YACH,MAAM,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;SACrB;QAAC,OAAO,GAAG,EAAE;YACb,MAAM,GAAG,CAAC;SACV;IACF,CAAC;IAED;;;;QAII;IACI,KAAK,CAAC,OAAO,CAAE,CAAU;QAChC,MAAM,WAAW,GAAY,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC7C,MAAM,GAAG,GAAY,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC5C,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,WAAW,QAAQ,GAAG,EAAE,CAAC,CAAC;QACjD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,GAAS,EAAE,GAAS,EAAE,EAAQ;IACxD,OAAO,IAAI,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sequencer/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAGb,6BAA0B;AAE1B,uCAA2C;AAC3C,iCAA8B;AAI9B,6BAA6B;AAE7B,IAAI,GAAe,CAAC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G,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;SACtC;QACD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,IAAI,CAAC,KAAK,EAAE;YACf,2BAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAClC;QACD,QAAQ;IAET,CAAC;IAED;;;;QAII;IACI,KAAK,CAAC,IAAI,CAAG,CAAS;QAC7B,IAAI;YACH,MAAM,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;SACrB;QAAC,OAAO,GAAG,EAAE;YACb,MAAM,GAAG,CAAC;SACV;IACF,CAAC;IAED;;;;QAII;IACI,KAAK,CAAC,OAAO,CAAE,CAAU;QAChC,MAAM,WAAW,GAAY,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC7C,MAAM,GAAG,GAAY,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC5C,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,WAAW,QAAQ,GAAG,EAAE,CAAC,CAAC;QACjD,YAAY;QACZ,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;CACD;AApQD,8BAoQC;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,GAAS,EAAE,GAAS,EAAE,EAAQ;IACxD,OAAO,IAAI,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/server/index.d.ts b/app/lib/server/index.d.ts index cb0ff5c..9eb1b02 100644 --- a/app/lib/server/index.d.ts +++ b/app/lib/server/index.d.ts @@ -1 +1,58 @@ -export {}; +import WebSocket from 'ws'; +import express, { Request, Response } from 'express'; +interface ServerData { + [key: string]: string; + PORT?: string; + SCRIPT?: string; +} +interface ServerTemplate { + name: string; + path: string; + data?: string; +} +interface ServerProxy { + path: string; +} +interface ServerProxyList { + [key: string]: ServerProxy; +} +interface ServerQueue { + [key: string]: Function; +} +export declare class Server { + private id; + isActive: boolean; + private log; + private templates; + private http; + private httpd; + private wss; + private port; + private wsPort; + private proxy; + private queue; + private interval; + private intervalPeriod; + private ui; + constructor(uiInput: any); + private init; + private load; + template(name: string, data: ServerData): string; + startWss(): Promise; + startHttp(): Promise; + start(): Promise; + stopHttp(): Promise; + stop(): Promise; + index(req: Request, res: Response, next: Function): express.Response>; + image(req: Request, res: Response, next: Function): Promise; + addProxy(key: string, filePath: string): void; + cmdAll(action: string, options?: any): Promise; + displayImage(src: string): Promise; + useServer(): boolean; + /** + * WSS + **/ + cmd(ws: WebSocket, action: string, options?: any): Promise; + private notify; +} +export type { ServerData, ServerTemplate, ServerProxy, ServerProxyList, ServerQueue }; diff --git a/app/lib/server/index.js b/app/lib/server/index.js index 5b7ec38..8b7c00f 100644 --- a/app/lib/server/index.js +++ b/app/lib/server/index.js @@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.Server = void 0; const ws_1 = require("ws"); const express_1 = __importDefault(require("express")); const promises_1 = require("fs/promises"); @@ -198,6 +199,7 @@ class Server { this.ui.send('gui', { notify: { title, message } }); } } +exports.Server = Server; module.exports = function (ui) { return new Server(ui); }; diff --git a/app/lib/server/index.js.map b/app/lib/server/index.js.map index 359b288..06d9d9c 100644 --- a/app/lib/server/index.js.map +++ b/app/lib/server/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;;;AAEZ,2BAA+C;AAC/C,sDAA0E;AAC1E,0CAAsC;AACtC,+BAA+B;AAC/B,+BAAmC;AACnC,6BAA0B;AA4B1B,MAAM,MAAM;IAyBX,Y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/C,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,MAAM,EAAG,EAAE,KAAK,EAAE,OAAO,EAAE,EAAC,CAAC,CAAC;IACrD,CAAC;CACD;AAxND,wBAwNC;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,EAAQ;IAClC,OAAO,IAAI,MAAM,CAAC,EAAE,CAAC,CAAA;AACtB,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/ui/cam.js b/app/lib/ui/cam.js index 51348fa..73152d8 100644 --- a/app/lib/ui/cam.js +++ b/app/lib/ui/cam.js @@ -44,7 +44,7 @@ cam.move = function (callback) { return false; } obj = { - frame : true, + move : true, id : uuid() }; ipcRenderer.sendSync(cam.id, obj); diff --git a/app/lib/ui/proj.js b/app/lib/ui/proj.js index 9f6657b..80d5729 100644 --- a/app/lib/ui/proj.js +++ b/app/lib/ui/proj.js @@ -35,7 +35,7 @@ proj.move = function (callback) { return false; } obj = { - frame : true, + move : true, id : uuid() }; ipcRenderer.sendSync(proj.id, obj); @@ -149,7 +149,7 @@ proj.second.move = function (callback) { return false; } obj = { - frame : true, + move : true, id : uuid() }; ipcRenderer.sendSync(proj.second.id, obj); diff --git a/src/alert/index.ts b/src/alert/index.ts index 350308a..380bf1e 100644 --- a/src/alert/index.ts +++ b/src/alert/index.ts @@ -1,12 +1,12 @@ 'use strict'; -import { delay } from 'delay' +import { delay } from 'delay'; import { Log } from 'log'; import type { Logger } from 'winston'; /* class representing alert functionality */ -class Alert { +export class Alert { private ipc : any private log : Logger private id : string = 'alert' @@ -51,7 +51,7 @@ class Alert { /** * **/ - public async start (cmd : string) { + public async start (cmd : string) : Promise { const start = +new Date(); const msg : string = (cmd + '').replace('ALERT', '').replace('Alert', '').replace('alert', '').trim() this.ui.send(this.id, { msg }) diff --git a/src/arduino/index.ts b/src/arduino/index.ts index 4199ea8..46e9349 100644 --- a/src/arduino/index.ts +++ b/src/arduino/index.ts @@ -45,14 +45,12 @@ const KNOWN : string[] = [ * Class representing the arduino communication features **/ -class Arduino { +export class Arduino { private log : Logger; private path : any = {}; private known : string[] = KNOWN; - private alias : any = {}; private serial : any = {}; - private hasState : any = {}; private baud : number = 57600; private queue : any = {}; private timer : number = 0; @@ -62,7 +60,9 @@ class Arduino { private keys : string[]; private values : string[]; + public alias : any = {}; public stateStr : any = {}; + public hasState : any = {}; constructor (errorState : Function) { this.errorState = errorState; diff --git a/src/cam/index.ts b/src/cam/index.ts index 50638f2..7087a6a 100644 --- a/src/cam/index.ts +++ b/src/cam/index.ts @@ -5,28 +5,35 @@ import { Processing } from 'processing'; import { delay } from 'delay'; import { Log } from 'log'; import type { Logger } from 'winston'; +import type { Arduino } from 'arduino'; +import type { FilmOut } from 'filmout'; + +interface CameraState{ + pos : number, + dir : boolean, + capper : boolean +} /** class representing camera functions **/ - -class Camera { - private state : any = { +export class Camera { + public state : CameraState = { pos : 0, dir : true, - capepr: false + capper: false }; - private arduino : Arduino = null; - private intval : any = null; - private processing : any = null; + public arduino : Arduino = null; + private intval : Intval = null; + private processing : Processing = null; private log : Logger; private cfg : any; - private filmout : any; + private filmout : FilmOut; private ui : any; private ipc : any; private id : string = 'camera'; /** * **/ - constructor (arduino : Arduino, cfg : any, ui : any, filmout : any, second : boolean = false) { + constructor (arduino : Arduino, cfg : any, ui : any, filmout : FilmOut, second : boolean = false) { this.arduino = arduino; this.cfg = cfg; this.ui = ui; @@ -114,7 +121,7 @@ class Camera { /** * **/ - public async move (frame : number, id : string) { + public async move (id : string) { const cmd : string = this.cfg.arduino.cmd[this.id]; let ms : number; if (this.filmout.state.enabled) { @@ -130,7 +137,7 @@ class Camera { try { ms = await this.intval.move(); } catch (err) { - this.log.error(err); + this.log.error(`Error moving intval ${this.id}: ${id}`, err); } } else { try { @@ -147,13 +154,13 @@ class Camera { return this.end(cmd, id, ms); } - public async both (frame : any, id : string) { + public async both (id : string) { const cmd : string = this.cfg.arduino.cmd[id]; let ms : number; try { ms = await this.arduino.send(this.id, cmd) } catch (err) { - this.log.error(`Error moving ${this.id}`, err) + this.log.error(`Error moving both ${this.id}: ${id}`, err) } //this.log.info('Cameras move time', { ms }); return await this.end(cmd, id, ms) @@ -172,7 +179,7 @@ class Camera { let confirmExposure : number; if (this.intval) { - return this.intval.setExposure(this.id, exposure, (ms : number) => { + return this.intval.setExposure(exposure, (ms : number) => { this.ui.send('timing', { c : 'c', ms : exposure }); return this.end(cmd, id, ms); }); @@ -263,9 +270,9 @@ class Camera { } catch (err) { this.log.error(err) } - } else if (typeof arg.frame !== 'undefined') { + } else if (typeof arg.move !== 'undefined') { try { - await this.move(arg.frame, arg.id) + await this.move(arg.id) } catch (err) { this.log.error(err) } diff --git a/src/capper/index.ts b/src/capper/index.ts index c6eb7c7..ec831ad 100644 --- a/src/capper/index.ts +++ b/src/capper/index.ts @@ -5,25 +5,26 @@ import { Processing } from 'processing'; import { delay } from 'delay'; import { Log } from 'log'; import type { Logger } from 'winston'; - +import type { FilmOut } from 'filmout'; +import type { Arduino } from 'arduino'; /** class representing capper functions **/ -class Capper { +export class Capper { private state : any = { capper : false }; private arduino : Arduino = null; private log : Logger; private cfg : any; - private filmout : any; + private filmout : FilmOut; private ui : any; private ipc : any; private id : string = 'capper'; /** * **/ - constructor (arduino : Arduino, cfg : any, ui : any, filmout : any) { + constructor (arduino : Arduino, cfg : any, ui : any, filmout : FilmOut) { this.arduino = arduino; this.cfg = cfg; this.ui = ui; @@ -50,7 +51,7 @@ class Capper { /** * **/ - public async capper (state : boolean, id : string) { + public async capper (state : boolean, id : string) : Promise { let cmd : string; let ms : number; @@ -77,9 +78,9 @@ class Capper { private async listener (event : any, arg : any) { if (typeof arg.state !== 'undefined') { try { - await this.capper(arg.state, arg.id) + await this.capper(arg.state, arg.id); } catch (err) { - this.log.error(err) + this.log.error(err); } } event.returnValue = true @@ -88,8 +89,8 @@ class Capper { /** * **/ - private async end (cmd : string, id : string, ms : number) { - let message = ''; + private async end (cmd : string, id : string, ms : number) : Promise { + let message : string = ''; if (cmd === this.cfg.arduino.cmd.capper_on) { message = 'Capper set to ON'; @@ -97,10 +98,11 @@ class Capper { message = 'Capper set to OFF'; } - message += ` ${ms}ms` + message += ` ${ms}ms`; this.log.info(message); this.ui.send(this.id, {cmd: cmd, id : id, ms: ms}); + return ms; } } diff --git a/src/cmd/index.ts b/src/cmd/index.ts index 5b5c1eb..5f07e10 100644 --- a/src/cmd/index.ts +++ b/src/cmd/index.ts @@ -2,18 +2,23 @@ import { v4 as uuid } from 'uuid'; import { delay } from 'delay'; +import type { Projector } from 'proj'; +import type { Camera } from 'cam'; +import type { Light } from 'light'; +import type { Capper } from 'capper'; +import type { Alert } from 'alert'; -class Commands { - private proj : any; - private cam : any; - private light : any; +export class Commands { + public proj : Projector; + public cam : Camera; + public light : Light; - private cam2 : any; - private proj2 : any; + public cam2 : Camera; + public proj2 : Projector; - private capper : any; + public capper : Capper; - private alertObj : any; + public alertObj : Alert; private cfg : any; private ipc : any; @@ -33,7 +38,7 @@ class Commands { * **/ - constructor (cfg : any, proj : any, cam : any, light : any, alert : any, cam2 : any = null, proj2 : any = null, capper : any = null) { + constructor (cfg : any, proj : Projector, cam : any, light : Light, alert : Alert, cam2 : any = null, proj2 : Projector = null, capper : any = null) { this.cfg = cfg; this.proj = proj; this.cam = cam; @@ -52,15 +57,16 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async projector_forward () { + public async projector_forward () : Promise { + const id : string = uuid(); let ms : number; try { if (!this.proj.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.proj.set(true); + await this.proj.set(true, id); } await delay(this.cfg.arduino.serialDelay); - ms = await this.proj.move(); + ms = await this.proj.move(id); } catch (err) { throw err; } @@ -71,15 +77,16 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async projector_backward () { + public async projector_backward () : Promise { + const id : string = uuid(); let ms : number; try { if (this.proj.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.proj.set(false); + await this.proj.set(false, id); } await delay(this.cfg.arduino.serialDelay); - ms = await this.proj.move(); + ms = await this.proj.move(id); } catch (err) { throw err; } @@ -92,7 +99,7 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async camera_forward () { + public async camera_forward () : Promise { const id : string = uuid(); const off : number[] = [0, 0, 0]; let rgb : number[] = [255, 255, 255]; @@ -100,12 +107,12 @@ class Commands { try { if (!this.cam.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.cam.set(true); + await this.cam.set(true, id); } await delay(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await delay(this.cfg.arduino.serialDelay); - ms = await this.cam.move(); + ms = await this.cam.move(id); await delay(this.cfg.arduino.serialDelay); await this.light.set(off, id); } catch (err) { @@ -118,14 +125,14 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async black_forward () { + public async black_forward () : Promise { const id : string = uuid(); const off : number[] = [0, 0, 0]; let ms : number = 0; try { if (!this.cam.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.cam.set(true); + await this.cam.set(true, id); } await delay(this.cfg.arduino.serialDelay); if (this.capper) { @@ -134,7 +141,7 @@ class Commands { await delay(this.cfg.arduino.serialDelay); await this.light.set(off, id); //make sure set to off await delay(this.cfg.arduino.serialDelay); - ms += await this.cam.move(); + ms += await this.cam.move(id); await delay(this.cfg.arduino.serialDelay); await this.light.set(off, id); if (this.capper) { @@ -152,7 +159,7 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async camera_backward () { + public async camera_backward () : Promise { const id : string = uuid(); const off : number[] = [0, 0, 0]; let rgb : number[] = [255, 255, 255]; @@ -160,12 +167,12 @@ class Commands { try { if (this.cam.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.cam.set(false); + await this.cam.set(false, id); } await delay(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await delay(this.cfg.arduino.serialDelay); - ms = await this.cam.move(); + ms = await this.cam.move(id); await delay(this.cfg.arduino.serialDelay); await this.light.set(off, id); } catch (err) { @@ -178,14 +185,14 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async black_backward () { + public async black_backward () : Promise { const id : string = uuid(); const off : number[] = [0, 0, 0]; let ms : number = 0; try { if (this.cam.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.cam.set(false); + await this.cam.set(false, id); } if (this.capper) { ms += await this.capper.capper(true, id); @@ -193,7 +200,7 @@ class Commands { await delay(this.cfg.arduino.serialDelay); await this.light.set(off, id); //make sure set to off await delay(this.cfg.arduino.serialDelay); - ms += await this.cam.move(); + ms += await this.cam.move(id); await delay(this.cfg.arduino.serialDelay); await this.light.set(off, id); if (this.capper) { @@ -212,7 +219,7 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async camera_second_forward () { + public async camera_second_forward () : Promise { const id : string = uuid(); const off : number[] = [0, 0, 0]; let rgb : number[] = [255, 255, 255]; @@ -220,12 +227,12 @@ class Commands { try { if (!this.cam2.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.cam2.set(true); + await this.cam2.set(true, id); } await delay(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await delay(this.cfg.arduino.serialDelay); - ms = await this.cam2.move(); + ms = await this.cam2.move(id); await delay(this.cfg.arduino.serialDelay); await this.light.set(off, id); } catch (err) { @@ -241,7 +248,7 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async camera_second_backward () { + public async camera_second_backward () : Promise { const id : string = uuid(); const off : number[] = [0, 0, 0]; let rgb : number[] = [255, 255, 255]; @@ -249,12 +256,12 @@ class Commands { try { if (this.cam2.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.cam2.set(false); + await this.cam2.set(false, id); } await delay(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await delay(this.cfg.arduino.serialDelay); - ms = await this.cam2.move(); + ms = await this.cam2.move(id); await delay(this.cfg.arduino.serialDelay); await this.light.set(off, id); } catch (err) { @@ -271,7 +278,7 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async cameras_forward () { + public async cameras_forward () : Promise { const id : string = uuid(); const off : number[] = [0, 0, 0]; let rgb : number[] = [255, 255, 255]; @@ -280,20 +287,20 @@ class Commands { try { if (!this.cam.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.cam.set(true); + await this.cam.set(true, id); } if (!this.cam2.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.cam2.set(true); + await this.cam2.set(true, id); } await delay(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await delay(this.cfg.arduino.serialDelay); if (this.cam && this.cam2 && this.cam.arduino.alias.camera === this.cam.arduino.alias.camera_second) { - ms = await this.cam.both(); + ms = await this.cam.both(id); } else { - both = await Promise.all( [this.cam.move(), this.cam2.move()] ); + both = await Promise.all( [this.cam.move(id), this.cam2.move(id)] ); ms = Math.max(...both); } @@ -311,7 +318,7 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async cameras_backward () { + public async cameras_backward () : Promise { const id : string = uuid(); const off : number[] = [0, 0, 0]; let rgb : number[] = [255, 255, 255]; @@ -320,20 +327,20 @@ class Commands { try { if (this.cam.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.cam.set(false); + await this.cam.set(false, id); } if (this.cam2.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.cam2.set(false); + await this.cam2.set(false, id); } await delay(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await delay(this.cfg.arduino.serialDelay); if (this.cam && this.cam2 && this.cam.arduino.alias.camera === this.cam.arduino.alias.camera_second) { - ms = await this.cam.both(); + ms = await this.cam.both(id); } else { - both = await Promise.all( [this.cam.move(), this.cam2.move()] ); + both = await Promise.all( [this.cam.move(id), this.cam2.move(id)] ); ms = Math.max(...both); } @@ -352,7 +359,7 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async camera_forward_camera_second_backward () { + public async camera_forward_camera_second_backward () : Promise { const id : string = uuid(); const off : number[] = [0, 0, 0]; let rgb : number[] = [255, 255, 255]; @@ -361,20 +368,20 @@ class Commands { try { if (!this.cam.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.cam.set(true); + await this.cam.set(true, id); } if (this.cam2.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.cam2.set(false); + await this.cam2.set(false, id); } await delay(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await delay(this.cfg.arduino.serialDelay); if (this.cam && this.cam2 && this.cam.arduino.alias.camera === this.cam.arduino.alias.camera_second) { - ms = await this.cam.both(); + ms = await this.cam.both(id); } else { - both = await Promise.all( [this.cam.move(), this.cam2.move()] ); + both = await Promise.all( [this.cam.move(id), this.cam2.move(id)] ); ms = Math.max(...both); } @@ -392,7 +399,7 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async camera_backward_camera_second_forward () { + public async camera_backward_camera_second_forward () : Promise { const id : string = uuid(); const off : number[] = [0, 0, 0]; let rgb : number[] = [255, 255, 255]; @@ -401,20 +408,20 @@ class Commands { try { if (this.cam.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.cam.set(false); + await this.cam.set(false, id); } if (!this.cam2.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.cam2.set(true); + await this.cam2.set(true, id); } await delay(this.cfg.arduino.serialDelay); await this.light.set(rgb, id); await delay(this.cfg.arduino.serialDelay); if (this.cam && this.cam2 && this.cam.arduino.alias.camera === this.cam.arduino.alias.camera_second) { - ms = await this.cam.both(); + ms = await this.cam.both(id); } else { - both = await Promise.all( [this.cam.move(), this.cam2.move()] ); + both = await Promise.all( [this.cam.move(id), this.cam2.move(id)] ); ms = Math.max(...both); } @@ -431,15 +438,16 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async projector_second_forward () { + public async projector_second_forward () : Promise { + const id : string = uuid(); let ms : number; try { if (!this.proj2.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.proj2.set(true); + await this.proj2.set(true, id); } await delay(this.cfg.arduino.serialDelay); - ms = await this.proj2.move(); + ms = await this.proj2.move(id); } catch (err) { throw err; } @@ -450,15 +458,16 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async projector_second_backward () { + public async projector_second_backward () : Promise { + const id : string = uuid(); let ms : number; try { if (this.proj2.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.proj2.set(false); + await this.proj2.set(false, id); } await delay(this.cfg.arduino.serialDelay); - ms = await this.proj2.move(); + ms = await this.proj2.move(id); } catch (err) { throw err; } @@ -470,23 +479,24 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async projectors_forward () { + public async projectors_forward () : Promise { + const id : string = uuid(); let both : number[]; let ms : number; try { if (!this.proj.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.proj.set(true); + await this.proj.set(true, id); } if (!this.proj2.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.proj2.set(true); + await this.proj2.set(true, id); } await delay(this.cfg.arduino.serialDelay); if (this.proj && this.proj2 && this.proj.arduino.alias.projector === this.proj.arduino.alias.projector_second) { - ms = await this.proj.both(); + ms = await this.proj.both(id); } else { - both = await Promise.all([ this.proj.move(), this.proj2.move() ]); + both = await Promise.all([ this.proj.move(id), this.proj2.move(id) ]); ms = Math.max(...both); } } catch (err) { @@ -499,23 +509,24 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async projectors_backward () { + public async projectors_backward () : Promise { + const id : string = uuid(); let both : number[]; let ms : number; try { if (this.proj.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.proj.set(false); + await this.proj.set(false, id); } if (this.proj2.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.proj2.set(false); + await this.proj2.set(false, id); } await delay(this.cfg.arduino.serialDelay); if (this.proj && this.proj2 && this.proj.arduino.alias.projector === this.proj.arduino.alias.projector_second) { - ms = await this.proj.both(); + ms = await this.proj.both(id); } else { - both = await Promise.all([ this.proj.move(), this.proj2.move() ]); + both = await Promise.all([ this.proj.move(id), this.proj2.move(id) ]); ms = Math.max(...both); } } catch (err) { @@ -530,23 +541,24 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async projector_forward_projector_second_backward () { + public async projector_forward_projector_second_backward () : Promise { + const id : string = uuid(); let both : number[]; let ms : number; try { if (!this.proj.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.proj.set(true); + await this.proj.set(true, id); } if (this.proj2.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.proj2.set(false); + await this.proj2.set(false, id); } await delay(this.cfg.arduino.serialDelay); if (this.proj && this.proj2 && this.proj.arduino.alias.projector === this.proj.arduino.alias.projector_second) { - ms = await this.proj.both(); + ms = await this.proj.both(id); } else { - both = await Promise.all([ this.proj.move(), this.proj2.move() ]); + both = await Promise.all([ this.proj.move(id), this.proj2.move(id) ]); ms = Math.max(...both); } } catch (err) { @@ -560,23 +572,24 @@ class Commands { * * @returns {integer} Length of action in ms **/ - public async projector_backward_projector_second_forward () { + public async projector_backward_projector_second_forward () : Promise { + const id : string = uuid(); let both : number[]; let ms : number; try { if (this.proj.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.proj.set(false); + await this.proj.set(false, id); } if (!this.proj2.state.dir) { await delay(this.cfg.arduino.serialDelay); - await this.proj2.set(true); + await this.proj2.set(true, id); } await delay(this.cfg.arduino.serialDelay); if (this.proj && this.proj2 && this.proj.arduino.alias.projector === this.proj.arduino.alias.projector_second) { - ms = await this.proj.both(); + ms = await this.proj.both(id); } else { - both = await Promise.all([ this.proj.move(), this.proj2.move() ]); + both = await Promise.all([ this.proj.move(id), this.proj2.move(id) ]); ms = Math.max(...both); } } catch (err) { @@ -591,7 +604,8 @@ class Commands { * @returns {integer} Length of action in ms **/ - public async alert (cmd : any) { + public async alert (cmd : any) : Promise { + const id : string = uuid(); let ms : number; try { ms = await this.alertObj.start(cmd.light); //change this meta @@ -608,7 +622,8 @@ class Commands { * @returns {integer} Length of action in ms **/ - public async pause (cmd : any) { + public async pause (cmd : any) : Promise{ + const id : string = uuid(); let ms : number; try { ms = await delay(cmd.light * 1000); //delay is in seconds @@ -618,10 +633,15 @@ class Commands { return ms; } - public async camera_exposure (cmd : any) { + /** + * Sets the camera exposure (if supported). + * + **/ + public async camera_exposure (cmd : any) : Promise{ + const id : string = uuid(); let ms : number; try { - ms = await this.cam.exposure(cmd.light); + ms = await this.cam.exposure(cmd.light, id); } catch (err) { throw err; } diff --git a/src/delay/index.ts b/src/delay/index.ts index fbb801e..b2db0b6 100644 --- a/src/delay/index.ts +++ b/src/delay/index.ts @@ -8,9 +8,9 @@ * @returns {Promise} Promise to resolve after timeout **/ -export function delay (ms : number) { +export function delay (ms : number) : Promise { return new Promise((resolve : any) => { - return setTimeout(resolve, ms); + return setTimeout(() => { resolve(ms) }, ms); }); } diff --git a/src/devices/index.ts b/src/devices/index.ts index c684733..ba51ab6 100644 --- a/src/devices/index.ts +++ b/src/devices/index.ts @@ -3,7 +3,8 @@ import { delay } from 'delay'; import { Log } from 'log'; import type { Logger } from 'winston'; -import type { Settings } from '../settings'; +import type { Settings } from 'settings'; +import type { Arduino } from 'arduino'; /** * class representing the device discovery features @@ -11,7 +12,7 @@ import type { Settings } from '../settings'; * **/ -class Devices { +export class Devices { public settings : Settings; public connected : any = {} diff --git a/src/display/index.ts b/src/display/index.ts index ac41054..2b1614d 100644 --- a/src/display/index.ts +++ b/src/display/index.ts @@ -10,15 +10,14 @@ import { format as urlFormat } from 'url'; import { delay } from 'delay'; import { Log } from 'log'; import type { Logger } from 'winston'; - -const { BrowserWindow } = require('electron'); +import { BrowserWindow } from 'electron'; class WebView { private digitalWindow : any; public opened : boolean = false; public showing : boolean = false; private platform : string; - public display : any; + public display : any; //needs type private loadWait : any = {}; private ipc : any; private log : Logger; @@ -158,7 +157,7 @@ class WebView { } } -class Display { +export class Display { private platform : string; private displays : any[]; private display : any; diff --git a/src/exec/index.ts b/src/exec/index.ts index 2e13ab7..c989999 100644 --- a/src/exec/index.ts +++ b/src/exec/index.ts @@ -29,7 +29,7 @@ async function exec(...args : string[]) { if (opts === null) { opts = { maxBuffer : 1024 * 1024 } } - return new Promise((resolve, reject) => { + return new Promise((resolve : Function, reject : Function) => { const child = execRaw(cmd, opts, (err : Error, stdout : string, stderr: string) => err ? reject(err) : resolve({ stdout, diff --git a/src/exit/index.ts b/src/exit/index.ts index 8dbab7e..f313e48 100644 --- a/src/exit/index.ts +++ b/src/exit/index.ts @@ -18,4 +18,4 @@ function exit (msg : string, code : number = 0) { } } -module.exports.exit = exit; \ No newline at end of file +module.exports = { exit }; \ No newline at end of file diff --git a/src/ffmpeg/index.ts b/src/ffmpeg/index.ts index 0fa0ccd..bb1b405 100644 --- a/src/ffmpeg/index.ts +++ b/src/ffmpeg/index.ts @@ -10,16 +10,7 @@ import { Log } from 'log'; import type { Logger } from 'winston'; import Frame from 'frame'; - -interface FilmoutState { - frame : number; - path : string; - hash : string; - info : any; - frames?: number; - directory?: boolean; - files?: string[]; -} +import type { FilmOutState } from 'filmout'; interface StdErr { frame : number; @@ -58,7 +49,7 @@ async function spawnAsync (bin : string, args : string[]) { /** @class FFMPEG **/ -class FFMPEG { +export class FFMPEG { private bin : string; private log : Logger; private id : string = 'ffmpeg'; @@ -140,7 +131,7 @@ class FFMPEG { * * @returns {string} Path of frame **/ - public async frame (state : FilmoutState, light : any) { + public async frame (state : FilmOutState, light : any) { const frameNum : number = state.frame; const video : string = state.directory ? state.files[frameNum] : state.path; const w : number = state.info.width; @@ -220,7 +211,7 @@ class FFMPEG { * @returns {?} **/ - public async frames (state : FilmoutState) { + public async frames (state : FilmOutState) { const video : string = state.path; const w : number = state.info.width; const h : number = state.info.height; @@ -415,4 +406,6 @@ class FFMPEG { module.exports = (sys : any) => { return new FFMPEG(sys); -} \ No newline at end of file +} + +export type { StdErr }; \ No newline at end of file diff --git a/src/ffprobe/index.ts b/src/ffprobe/index.ts index 63dbb8d..78ba30a 100644 --- a/src/ffprobe/index.ts +++ b/src/ffprobe/index.ts @@ -7,10 +7,8 @@ import { extname } from 'path'; import { exec } from 'exec'; import { Log } from 'log'; import type { Logger } from 'winston'; -//const spawn = require('spawn'); -//const exit = require('exit'); -class FFPROBE { +export class FFPROBE { private bin : string; private log : Logger; constructor (sys : any) { diff --git a/src/filmout/index.ts b/src/filmout/index.ts index aeadae5..260fc84 100644 --- a/src/filmout/index.ts +++ b/src/filmout/index.ts @@ -9,20 +9,43 @@ import Jimp from 'jimp'; import Frame from 'frame'; import { Log } from 'log'; import type { Logger } from 'winston'; +import type { Server } from 'server'; +import type { Display } from 'display'; +import type { Light } from 'light'; +import type { FFMPEG } from 'ffmpeg'; +import type { FFPROBE } from 'ffprobe'; + +interface FilmOutState { + hash : string, + frame : number, + frames : number, + fps : number, + seconds : number, + still : boolean, + path : string, + fileName : string, + directory : boolean, + info : any, + dir : boolean, + enabled : boolean, + files : string[] +} /** * @module FilmOut **/ - -class FilmOut { +export class FilmOut { private id : string = 'filmout'; private videoExtensions : string[] = ['.mpg', '.mpeg', '.mov', '.mkv', '.avi', '.mp4']; private stillExtensions : string[] = ['.tif', '.tiff', '.png', '.jpg', '.jpeg', '.bmp']; private sequenceExtensions : string[] = ['.png', '.jpg', '.jpeg']; private gifExtension : string = '.gif'; - public state : any = { + public state : FilmOutState = { + hash : null, frame : 0, frames : 0, + fps : 24, + seconds : 0, still : false, path : null, fileName : null, @@ -32,14 +55,15 @@ class FilmOut { enabled : false, files : [] }; - private display : any; - private ffmpeg : any; - private ffprobe : any; - private light : any; + private ffmpeg : FFMPEG; + private ffprobe : FFPROBE; + private light : Light; private ipc : any; private ui : any; private log : Logger; - private server : any; + + public display : Display; + public server : Server; /** * @constructor * Builds FilmOut class with display, ffmpeg, ffprobe, ui and light as internal properties. @@ -50,7 +74,7 @@ class FilmOut { * @param {object} ui Electron ui object * @param {object} light Light device object **/ - constructor (display : any, server : any, ffmpeg : any, ffprobe : any, ui : any, light : any) { + constructor (display : Display, server : Server, ffmpeg : FFMPEG, ffprobe : FFPROBE, ui : any, light : Light) { this.display = display; this.server = server; this.ffmpeg = ffmpeg; @@ -92,7 +116,7 @@ class FilmOut { * * @param {string} data Data to produce hash of */ - private hash (data : string) { + private hash (data : string) : string { return createHash('sha1').update(data).digest('hex'); } /** @@ -126,7 +150,7 @@ class FilmOut { /** * Begin the process of exporting single frames from the video for display. **/ - async start () { + public async start () { let path; try { @@ -147,7 +171,7 @@ class FilmOut { /** * Ends the filmout process and closes the display. **/ - private async end () { + public async end () { await delay(20); this.display.hide(); } @@ -521,3 +545,5 @@ class FilmOut { module.exports = (display : any, server : any, ffmpeg : any, ffprobe : any, ui : any, light : any) => { return new FilmOut(display, server, ffmpeg, ffprobe, ui, light); } + +export type { FilmOutState }; \ No newline at end of file diff --git a/src/frame/index.ts b/src/frame/index.ts index 18e3053..e629145 100644 --- a/src/frame/index.ts +++ b/src/frame/index.ts @@ -74,4 +74,6 @@ export default class Frame { } } -module.exports = Frame \ No newline at end of file +module.exports = Frame + +export type { RGBA } \ No newline at end of file diff --git a/src/globals.d.ts b/src/globals.d.ts index e979909..e39c2e9 100644 --- a/src/globals.d.ts +++ b/src/globals.d.ts @@ -1,36 +1,13 @@ -declare module 'delay'; -declare module 'intval'; -declare module 'processing'; declare module 'electron'; declare module 'fs-extra'; declare module 'uuid'; declare module 'exec'; declare module 'spawn'; declare module 'systeminformation'; -declare module 'exit'; declare module 'request'; declare module 'animated-gif-detector'; -declare module 'frame'; interface Device { serial : string; device : string; } - -interface Arduino { - hasState : any; - alias : any; - serial : any; - stateStr : any; - send (id : string, cmd : string) : number; - sendString (id : string, str : string) : any; - enumerate () : any; - connect (device : string, serial : string, state : boolean) : any; - verify () : any; - distinguish () : any; - fakeConnect ( id : string) : any; - stateAsync (device : string, confirm: boolean) : any; - state (serial: string, confirm: boolean) : number; - close () : any; - aliasSerial ( device : string, serial : string) : any; -} diff --git a/src/intval/index.ts b/src/intval/index.ts index c7ffe9c..0b17c08 100644 --- a/src/intval/index.ts +++ b/src/intval/index.ts @@ -1,18 +1,19 @@ 'use strict' +import * as request from 'request' + export class Intval { private _baseUrl : string - private req : any + constructor (url : string) { this._baseUrl = `http://${url}` - this.req = require('request') } - public async move () { - return new Promise ((resolve : any, reject : any) => { + public async move () : Promise { + return new Promise ((resolve : Function, reject : Function) => { const timeStart : number = +new Date() const url : string = `${this._baseUrl}/frame` //console.log(url) - return this.req(url, (err : Error, res : any, body : string) => { + return request(url, (err : Error, res : any, body : string) => { let ms : number = (+new Date()) - timeStart if (err) { return reject(err) @@ -21,12 +22,12 @@ export class Intval { }) }) } - public async setDir (dir : boolean) { - return new Promise ((resolve : any, reject : any) => { + public async setDir (dir : boolean) : Promise { + return new Promise ((resolve : Function, reject : Function) => { const timeStart : number = +new Date() const url : string = `${this._baseUrl}/dir?dir=${dir}` //console.log(url) - return this.req(url, (err : Error, res : any, body : string) => { + return request(url, (err : Error, res : any, body : string) => { let ms : number = (+new Date()) - timeStart if (err) { return reject(err) @@ -35,11 +36,11 @@ export class Intval { }) }) } - public async setExposure (exposure : number, cb : Function) { - return new Promise ((resolve : any, reject : any) => { + public async setExposure (exposure : number, cb : Function) : Promise { + return new Promise ((resolve : Function, reject : Function) => { const timeStart : number = +new Date() const url : string = `${this._baseUrl}/exposure?exposure=${exposure}` - return this.req(url, (err : Error, res : any, body : string) => { + return request(url, (err : Error, res : any, body : string) => { let ms : number = (+new Date()) - timeStart if (err) { return reject(err) @@ -57,7 +58,7 @@ export class Intval { timeout: 5000 } - this.req(opts, (err : Error, res : any, body : string) => { + request(opts, (err : Error, res : any, body : string) => { let ms : number = (+new Date()) - timeStart if (err) { return cb(err, ms) @@ -67,4 +68,4 @@ export class Intval { } } -module.exports.Intval = Intval \ No newline at end of file +module.exports = { Intval } \ No newline at end of file diff --git a/src/light/index.ts b/src/light/index.ts index bcfbc9b..4aaa509 100644 --- a/src/light/index.ts +++ b/src/light/index.ts @@ -3,8 +3,9 @@ import { delay } from 'delay'; import { Log } from 'log'; import type { Logger } from 'winston'; +import type { Arduino } from 'arduino'; -class Light { +export class Light { public state : any = { color : [0, 0, 0] } private arduino : Arduino; diff --git a/src/mscript/index.ts b/src/mscript/index.ts index b9461c7..1c260e9 100644 --- a/src/mscript/index.ts +++ b/src/mscript/index.ts @@ -985,7 +985,7 @@ export default class Mscript { } module.exports = Mscript; - +export type { RGB }; /* diff --git a/src/processing/index.ts b/src/processing/index.ts index f157be7..077f203 100644 --- a/src/processing/index.ts +++ b/src/processing/index.ts @@ -2,14 +2,14 @@ import { exec } from 'exec'; -class Processing { +export class Processing { private _baseUrl : string constructor (url : string) { this._baseUrl = (url.indexOf('http') === -1 && url.indexOf('://') === -1) ? `http://${url}` : url } - public async move () { - return new Promise (async (resolve : any, reject : any) => { + public async move () : Promise { + return new Promise (async (resolve : Function, reject : Function) => { const timeStart : number = +new Date() const url : string = `${this._baseUrl}` const cmd : string = `curl --http0.9 ${url}` @@ -25,11 +25,11 @@ class Processing { return resolve(ms) }) } - public async setDir (dir : boolean) { - return new Promise ((resolve : any, reject : any) => { + public async setDir (dir : boolean) : Promise { + return new Promise ((resolve : Function, reject : Function) => { return resolve(0) }) } } -module.exports.Processing = Processing \ No newline at end of file +module.exports = { Processing } \ No newline at end of file diff --git a/src/proj/index.ts b/src/proj/index.ts index b9586be..c683446 100644 --- a/src/proj/index.ts +++ b/src/proj/index.ts @@ -2,18 +2,25 @@ import { Log } from 'log'; import type { Logger } from 'winston'; +import type { Arduino } from 'arduino'; +import type { FilmOut } from 'filmout'; -class Projector { - private state : any = { +interface ProjectorState { + pos : number, + dir : boolean +} + +export class Projector { + public state : ProjectorState = { pos : 0, dir : true }; - private arduino : Arduino = null; + public arduino : Arduino = null; private log : Logger; private cfg : any; private ui : any; private ipc : any; - private filmout : any; + public filmout : FilmOut; private id : string = 'projector'; /** @@ -62,17 +69,16 @@ class Projector { try { ms = await this.arduino.send(this.id, cmd) } catch (err) { - this.log.error(`Error setting ${this.id} direction`, err) + this.log.error(`Error setting ${this.id} direction: ${id}`, err) } } - console.dir(ms) return await this.end(cmd, id, ms) } /** * **/ - public async move (frame : any, id : string) { + public async move (id : string) { const cmd : string = this.cfg.arduino.cmd[this.id]; let ms : number; if (this.filmout.state.enabled) { @@ -85,20 +91,20 @@ class Projector { try { ms = await this.arduino.send(this.id, cmd) } catch (err) { - this.log.error(`Error moving ${this.id}`, err) + this.log.error(`Error moving ${this.id}: ${id}`, err) } } //this.log.info('Projector move time', { ms }); return await this.end(cmd, id, ms) } - public async both (frame : any, id : string) { + public async both (id : string) { const cmd : string = this.cfg.arduino.cmd[this.id + 's']; let ms : number; try { ms = await this.arduino.send(this.id, cmd) } catch (err) { - this.log.error(`Error moving ${this.id}`, err) + this.log.error(`Error moving ${this.id}: ${id}`, err) } //this.log.info('Projectors move time', { ms }); return await this.end(cmd, id, ms) @@ -114,11 +120,11 @@ class Projector { } catch (err) { this.log.error(err) } - } else if (typeof arg.frame !== 'undefined') { + } else if (typeof arg.move !== 'undefined') { try { - await this.move(arg.frame, arg.id) + await this.move(arg.id) } catch (err) { - this.log.error(err) + this.log.error(`Error moving ${this.id}: ${arg.id}`, err) } } else if (typeof arg.val !== 'undefined') { this.state.pos = arg.val; @@ -167,4 +173,6 @@ class Projector { module.exports = function (arduino : Arduino, cfg : any, ui : any, filmout : any, second : boolean) { return new Projector(arduino, cfg, ui, filmout, second) -} \ No newline at end of file +} + +export type { ProjectorState } \ No newline at end of file diff --git a/src/sequencer/index.ts b/src/sequencer/index.ts index 3cf7e06..ace59e6 100644 --- a/src/sequencer/index.ts +++ b/src/sequencer/index.ts @@ -4,14 +4,15 @@ import { v4 as uuid } from 'uuid'; import { Log } from 'log'; import type { Logger } from 'winston'; import { powerSaveBlocker } from 'electron' -import delay from 'delay'; +import { delay } from 'delay'; +import { Commands } from 'cmd'; /** @module lib/sequencer **/ let seq : Sequencer; -class Sequencer { +export class Sequencer { private running : boolean = false; private paused : boolean = false; @@ -22,7 +23,7 @@ class Sequencer { private loops : number = 1; private cfg : any; - private cmd : any; + private cmd : Commands; private CMDS : any = {}; private ipc : any; private ui : any; @@ -40,7 +41,7 @@ class Sequencer { * @param {object} ui Electron UI, browser window **/ - constructor (cfg : any, cmd : any, ui : any) { + constructor (cfg : any, cmd : Commands, ui : any) { this.cfg = cfg; this.cmd = cmd; this.ui = ui; @@ -268,6 +269,7 @@ class Sequencer { const cmdOriginal : string = this.arr[x].cmd; const cmd : string = this.CMDS[cmdOriginal]; this.log.info(`CMD: '${cmdOriginal}' -> ${cmd}`); + //@ts-ignore return await this.cmd[cmd](this.arr[x]); } } diff --git a/src/server/index.ts b/src/server/index.ts index c802896..851cb77 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -33,7 +33,7 @@ interface ServerQueue { [key: string]: Function; } -class Server { +export class Server { private id : string = 'server' public isActive : boolean = false private log : Logger @@ -63,13 +63,13 @@ class Server { this.ui = uiInput; } - async init () { + private async init () { this.log = await Log({ label : this.id }); await this.load() await this.start() } - async load () { + private async load () { this.http = express() for (let tmpl of this.templates) { tmpl.data = await readFile(tmpl.path, 'utf8') @@ -253,4 +253,6 @@ class Server { module.exports = function (ui : any) { return new Server(ui) -} \ No newline at end of file +} + +export type { ServerData, ServerTemplate, ServerProxy, ServerProxyList, ServerQueue }; \ No newline at end of file