Correct lib jsdocs in modules. Update tests to catch new error in mscript.

This commit is contained in:
Matt McWilliams 2024-05-24 15:23:58 -04:00
parent 6c8d2d712d
commit bc081cfe63
102 changed files with 1919 additions and 688 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.8.116",
"version": "1.8.117",
"ext_port": 1111,
"profiles": {
"mcopy": {

View File

@ -0,0 +1,40 @@
<a name="module_lib/alert"></a>
## lib/alert
* [lib/alert](#module_lib/alert)
* [~Alert](#module_lib/alert..Alert)
* [.init()](#module_lib/alert..Alert+init)
* [.listen()](#module_lib/alert..Alert+listen)
* [.listener()](#module_lib/alert..Alert+listener)
* [.start()](#module_lib/alert..Alert+start)
<a name="module_lib/alert..Alert"></a>
### lib/alert~Alert
Class for pushing an alert to the UI from the backend.
**Kind**: inner class of [<code>lib/alert</code>](#module_lib/alert)
* [~Alert](#module_lib/alert..Alert)
* [.init()](#module_lib/alert..Alert+init)
* [.listen()](#module_lib/alert..Alert+listen)
* [.listener()](#module_lib/alert..Alert+listener)
* [.start()](#module_lib/alert..Alert+start)
<a name="module_lib/alert..Alert+init"></a>
#### alert.init()
**Kind**: instance method of [<code>Alert</code>](#module_lib/alert..Alert)
<a name="module_lib/alert..Alert+listen"></a>
#### alert.listen()
**Kind**: instance method of [<code>Alert</code>](#module_lib/alert..Alert)
<a name="module_lib/alert..Alert+listener"></a>
#### alert.listener()
**Kind**: instance method of [<code>Alert</code>](#module_lib/alert..Alert)
<a name="module_lib/alert..Alert+start"></a>
#### alert.start()
**Kind**: instance method of [<code>Alert</code>](#module_lib/alert..Alert)

View File

@ -1,4 +1,8 @@
import type { WebContents } from 'electron';
/** @module lib/alert */
/**
* Class for pushing an alert to the UI from the backend.
*/
export declare class Alert {
private ipc;
private log;

View File

@ -3,7 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.Alert = void 0;
const electron_1 = require("electron");
const log_1 = require("log");
/* class representing alert functionality */
/** @module lib/alert */
/**
* Class for pushing an alert to the UI from the backend.
*/
class Alert {
constructor(ui) {
this.ipc = electron_1.ipcMain;

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/alert/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,uCAAmC;AAEnC,6BAA0B;AAI1B,4CAA4C;AAE5C,MAAa,KAAK;IAOjB,YAAc,EAAgB;QANtB,QAAG,GAAoB,kBAAO,CAAA;QAE9B,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,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,KAAoB,EAAE,GAAS;QACtD,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,OAAO,GAAG,EAAE;gBACb,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;aACnB;SACD;QACD,KAAK,CAAC,WAAW,GAAG,IAAI,CAAA;IACzB,CAAC;IAED;;QAEI;IACG,KAAK,CAAC,KAAK,CAAE,GAAY;QAC/B,MAAM,KAAK,GAAY,CAAC,IAAI,IAAI,EAAE,CAAC;QACn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AAED,MAAM,CAAC,OAAO,GAAG,EAAE,KAAK,EAAE,CAAA"}

View File

@ -1,9 +1,8 @@
## Classes
## Modules
<dl>
<dt><a href="#Arduino">Arduino</a></dt>
<dd><p>Class representing the arduino communication features</p>
</dd>
<dt><a href="#module_lib/arduino">lib/arduino</a></dt>
<dd></dd>
</dl>
## Constants
@ -20,45 +19,69 @@ projector, light) that is aliased to a serial port</p>
</dd>
</dl>
<a name="Arduino"></a>
<a name="module_lib/arduino"></a>
## Arduino
Class representing the arduino communication features
## lib/arduino
**Kind**: global class
* [lib/arduino](#module_lib/arduino)
* [~Arduino](#module_lib/arduino..Arduino)
* [.enumerate()](#module_lib/arduino..Arduino+enumerate) ⇒ <code>Promise</code>
* [.sendAsync(device, cmd)](#module_lib/arduino..Arduino+sendAsync) ⇒ <code>Promise</code>
* [.send(device, cmd)](#module_lib/arduino..Arduino+send) ⇒ <code>Promise.&lt;(boolean\|string)&gt;</code>
* [.sendString(device, str)](#module_lib/arduino..Arduino+sendString) ⇒ <code>Promise.&lt;(boolean\|string)&gt;</code>
* [.stateAsync()](#module_lib/arduino..Arduino+stateAsync)
* [.state()](#module_lib/arduino..Arduino+state)
* [.writeAsync(device, str)](#module_lib/arduino..Arduino+writeAsync) ⇒ <code>Promise</code>
* [.end(serial, data)](#module_lib/arduino..Arduino+end) ⇒ <code>any</code>
* [.aliasSerial(device, serial)](#module_lib/arduino..Arduino+aliasSerial)
* [.connect(device, serial, confirm)](#module_lib/arduino..Arduino+connect) ⇒ <code>Promise.&lt;string&gt;</code>
* [.confirmEnd(data)](#module_lib/arduino..Arduino+confirmEnd)
* [.verify()](#module_lib/arduino..Arduino+verify) ⇒ <code>Promise.&lt;boolean&gt;</code>
* [.distinguish()](#module_lib/arduino..Arduino+distinguish) ⇒ <code>Promise.&lt;string&gt;</code>
* [.close()](#module_lib/arduino..Arduino+close) ⇒ <code>Promise.&lt;boolean&gt;</code>
* [.fakeConnect(serial)](#module_lib/arduino..Arduino+fakeConnect) ⇒ <code>Promise.&lt;boolean&gt;</code>
* [.openArduino(device)](#module_lib/arduino..Arduino+openArduino) ⇒ <code>Promise</code>
* [.closeArduino(device)](#module_lib/arduino..Arduino+closeArduino) ⇒ <code>Promise</code>
* [Arduino](#Arduino)
* [.enumerate()](#Arduino+enumerate) ⇒ <code>Promise</code>
* [.sendAsync(device, cmd)](#Arduino+sendAsync) ⇒ <code>Promise</code>
* [.send(device, cmd)](#Arduino+send) ⇒ <code>Promise.&lt;(boolean\|string)&gt;</code>
* [.sendString(device, str)](#Arduino+sendString) ⇒ <code>Promise.&lt;(boolean\|string)&gt;</code>
* [.stateAsync()](#Arduino+stateAsync)
* [.state()](#Arduino+state)
* [.writeAsync(device, str)](#Arduino+writeAsync) ⇒ <code>Promise</code>
* [.end(serial, data)](#Arduino+end) ⇒ <code>any</code>
* [.aliasSerial(device, serial)](#Arduino+aliasSerial)
* [.connect(device, serial, confirm)](#Arduino+connect) ⇒ <code>Promise.&lt;string&gt;</code>
* [.confirmEnd(data)](#Arduino+confirmEnd)
* [.verify()](#Arduino+verify) ⇒ <code>Promise.&lt;boolean&gt;</code>
* [.distinguish()](#Arduino+distinguish) ⇒ <code>Promise.&lt;string&gt;</code>
* [.close()](#Arduino+close) ⇒ <code>Promise.&lt;boolean&gt;</code>
* [.fakeConnect(serial)](#Arduino+fakeConnect) ⇒ <code>Promise.&lt;boolean&gt;</code>
* [.openArduino(device)](#Arduino+openArduino) ⇒ <code>Promise</code>
* [.closeArduino(device)](#Arduino+closeArduino) ⇒ <code>Promise</code>
<a name="module_lib/arduino..Arduino"></a>
<a name="Arduino+enumerate"></a>
### lib/arduino~Arduino
Class representing the arduino communication features.
### arduino.enumerate() ⇒ <code>Promise</code>
**Kind**: inner class of [<code>lib/arduino</code>](#module_lib/arduino)
* [~Arduino](#module_lib/arduino..Arduino)
* [.enumerate()](#module_lib/arduino..Arduino+enumerate) ⇒ <code>Promise</code>
* [.sendAsync(device, cmd)](#module_lib/arduino..Arduino+sendAsync) ⇒ <code>Promise</code>
* [.send(device, cmd)](#module_lib/arduino..Arduino+send) ⇒ <code>Promise.&lt;(boolean\|string)&gt;</code>
* [.sendString(device, str)](#module_lib/arduino..Arduino+sendString) ⇒ <code>Promise.&lt;(boolean\|string)&gt;</code>
* [.stateAsync()](#module_lib/arduino..Arduino+stateAsync)
* [.state()](#module_lib/arduino..Arduino+state)
* [.writeAsync(device, str)](#module_lib/arduino..Arduino+writeAsync) ⇒ <code>Promise</code>
* [.end(serial, data)](#module_lib/arduino..Arduino+end) ⇒ <code>any</code>
* [.aliasSerial(device, serial)](#module_lib/arduino..Arduino+aliasSerial)
* [.connect(device, serial, confirm)](#module_lib/arduino..Arduino+connect) ⇒ <code>Promise.&lt;string&gt;</code>
* [.confirmEnd(data)](#module_lib/arduino..Arduino+confirmEnd)
* [.verify()](#module_lib/arduino..Arduino+verify) ⇒ <code>Promise.&lt;boolean&gt;</code>
* [.distinguish()](#module_lib/arduino..Arduino+distinguish) ⇒ <code>Promise.&lt;string&gt;</code>
* [.close()](#module_lib/arduino..Arduino+close) ⇒ <code>Promise.&lt;boolean&gt;</code>
* [.fakeConnect(serial)](#module_lib/arduino..Arduino+fakeConnect) ⇒ <code>Promise.&lt;boolean&gt;</code>
* [.openArduino(device)](#module_lib/arduino..Arduino+openArduino) ⇒ <code>Promise</code>
* [.closeArduino(device)](#module_lib/arduino..Arduino+closeArduino) ⇒ <code>Promise</code>
<a name="module_lib/arduino..Arduino+enumerate"></a>
#### arduino.enumerate() ⇒ <code>Promise</code>
Enumerate all connected devices that might be Arduinos
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
**Returns**: <code>Promise</code> - Resolves after enumerating
<a name="Arduino+sendAsync"></a>
<a name="module_lib/arduino..Arduino+sendAsync"></a>
### arduino.sendAsync(device, cmd) ⇒ <code>Promise</code>
#### arduino.sendAsync(device, cmd) ⇒ <code>Promise</code>
Send a command to an Arduino using async/await
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
**Returns**: <code>Promise</code> - Resolves after sending
| Param | Type | Description |
@ -66,14 +89,14 @@ Send a command to an Arduino using async/await
| device | <code>string</code> | The Arduino device identifier |
| cmd | <code>string</code> | Single character command to send |
<a name="Arduino+send"></a>
<a name="module_lib/arduino..Arduino+send"></a>
### arduino.send(device, cmd) ⇒ <code>Promise.&lt;(boolean\|string)&gt;</code>
#### arduino.send(device, cmd) ⇒ <code>Promise.&lt;(boolean\|string)&gt;</code>
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.
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
**Returns**: <code>Promise.&lt;(boolean\|string)&gt;</code> - Returns 'false' if the communication is locked, otherwise returns the response from the device.
**Throws**:
@ -85,14 +108,14 @@ Emits an 'arduino_send' event after successfully sending the command.
| device | <code>string</code> | The Arduino device identifier. |
| cmd | <code>string</code> | The command to be sent to the Arduino. |
<a name="Arduino+sendString"></a>
<a name="module_lib/arduino..Arduino+sendString"></a>
### arduino.sendString(device, str) ⇒ <code>Promise.&lt;(boolean\|string)&gt;</code>
#### arduino.sendString(device, str) ⇒ <code>Promise.&lt;(boolean\|string)&gt;</code>
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.
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
**Returns**: <code>Promise.&lt;(boolean\|string)&gt;</code> - Returns 'true' if the string is sent successfully, otherwise returns an error message.
**Throws**:
@ -104,20 +127,20 @@ Waits for a specified delay before sending the string.
| device | <code>string</code> | The Arduino device identifier. |
| str | <code>string</code> | The string to be sent to the Arduino. |
<a name="Arduino+stateAsync"></a>
<a name="module_lib/arduino..Arduino+stateAsync"></a>
### arduino.stateAsync()
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
<a name="Arduino+state"></a>
#### arduino.stateAsync()
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
<a name="module_lib/arduino..Arduino+state"></a>
### arduino.state()
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
<a name="Arduino+writeAsync"></a>
#### arduino.state()
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
<a name="module_lib/arduino..Arduino+writeAsync"></a>
### arduino.writeAsync(device, str) ⇒ <code>Promise</code>
#### arduino.writeAsync(device, str) ⇒ <code>Promise</code>
Send a string to an Arduino using async/await
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
**Returns**: <code>Promise</code> - Resolves after sending
| Param | Type | Description |
@ -125,14 +148,14 @@ Send a string to an Arduino using async/await
| device | <code>string</code> | Arduino identifier |
| str | <code>string</code> | String to send |
<a name="Arduino+end"></a>
<a name="module_lib/arduino..Arduino+end"></a>
### arduino.end(serial, data) ⇒ <code>any</code>
#### arduino.end(serial, data) ⇒ <code>any</code>
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.
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
**Returns**: <code>any</code> - The time taken for the communication in milliseconds.
| Param | Type | Description |
@ -140,27 +163,27 @@ and emits an 'arduino_end' event. Handles errors and stray data received.
| serial | <code>string</code> | The serial address of the Arduino device. |
| data | <code>string</code> | The data received from the Arduino. |
<a name="Arduino+aliasSerial"></a>
<a name="module_lib/arduino..Arduino+aliasSerial"></a>
### arduino.aliasSerial(device, serial)
#### arduino.aliasSerial(device, serial)
Associates an alias with an Arduinos serial address.
Used to map multi-purpose devices onto the same serial connection.
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
| Param | Type | Description |
| --- | --- | --- |
| device | <code>string</code> | The serial number of the target Arduino. |
| serial | <code>string</code> | The alias to be associated with the target device. |
<a name="Arduino+connect"></a>
<a name="module_lib/arduino..Arduino+connect"></a>
### arduino.connect(device, serial, confirm) ⇒ <code>Promise.&lt;string&gt;</code>
#### arduino.connect(device, serial, confirm) ⇒ <code>Promise.&lt;string&gt;</code>
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.
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
**Returns**: <code>Promise.&lt;string&gt;</code> - Resolves with the device path if the connection is successful.
**Throws**:
@ -173,84 +196,84 @@ Handles opening the connection and emitting 'arduino_end' or 'confirmEnd' events
| serial | <code>string</code> | The serial address of the target Arduino (e.g., COM port on Windows). |
| confirm | <code>function</code> | A callback function to be executed upon receiving confirmation data. |
<a name="Arduino+confirmEnd"></a>
<a name="module_lib/arduino..Arduino+confirmEnd"></a>
### arduino.confirmEnd(data)
#### arduino.confirmEnd(data)
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.
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
| Param | Type | Description |
| --- | --- | --- |
| data | <code>string</code> | The data received from the Arduino. |
<a name="Arduino+verify"></a>
<a name="module_lib/arduino..Arduino+verify"></a>
### arduino.verify() ⇒ <code>Promise.&lt;boolean&gt;</code>
#### arduino.verify() ⇒ <code>Promise.&lt;boolean&gt;</code>
Verifies the connection to an Arduino by sending a connect command.
The confirmation callback checks if the received data matches the expected connect command.
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
**Returns**: <code>Promise.&lt;boolean&gt;</code> - Resolves with 'true' if the connection is verified successfully.
**Throws**:
- <code>Error</code> Rejects with an error message if the connection verification fails.
<a name="Arduino+distinguish"></a>
<a name="module_lib/arduino..Arduino+distinguish"></a>
### arduino.distinguish() ⇒ <code>Promise.&lt;string&gt;</code>
#### arduino.distinguish() ⇒ <code>Promise.&lt;string&gt;</code>
Distinguishes the type of Arduino connected.
Sends a command to the device to identify its type and resolves the promise with the received type.
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
**Returns**: <code>Promise.&lt;string&gt;</code> - Resolves with the type of the connected Arduino-based device.
**Throws**:
- <code>Error</code> Rejects with an error message if the distinguish operation fails.
<a name="Arduino+close"></a>
<a name="module_lib/arduino..Arduino+close"></a>
### arduino.close() ⇒ <code>Promise.&lt;boolean&gt;</code>
#### arduino.close() ⇒ <code>Promise.&lt;boolean&gt;</code>
Closes the connection to an Arduino.
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
**Returns**: <code>Promise.&lt;boolean&gt;</code> - Resolves with 'true' if the connection is closed successfully.
**Throws**:
- <code>Error</code> Throws an error if the closeArduino method encounters an error.
<a name="Arduino+fakeConnect"></a>
<a name="module_lib/arduino..Arduino+fakeConnect"></a>
### arduino.fakeConnect(serial) ⇒ <code>Promise.&lt;boolean&gt;</code>
#### arduino.fakeConnect(serial) ⇒ <code>Promise.&lt;boolean&gt;</code>
Establishes a fake connection to an Arduino for testing purposes.
Creates a fake SerialPort instance with custom write and string methods.
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
**Returns**: <code>Promise.&lt;boolean&gt;</code> - Resolves with 'true' if the fake connection is established successfully.
| Param | Type | Description |
| --- | --- | --- |
| serial | <code>string</code> | The device identifier of the fake Arduino. |
<a name="Arduino+openArduino"></a>
<a name="module_lib/arduino..Arduino+openArduino"></a>
### arduino.openArduino(device) ⇒ <code>Promise</code>
#### arduino.openArduino(device) ⇒ <code>Promise</code>
Connect to an Arduino using async/await
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
**Returns**: <code>Promise</code> - Resolves after opening
| Param | Type | Description |
| --- | --- | --- |
| device | <code>string</code> | Arduino identifier |
<a name="Arduino+closeArduino"></a>
<a name="module_lib/arduino..Arduino+closeArduino"></a>
### arduino.closeArduino(device) ⇒ <code>Promise</code>
#### arduino.closeArduino(device) ⇒ <code>Promise</code>
Close a connection to an Arduino using async/await
**Kind**: instance method of [<code>Arduino</code>](#Arduino)
**Kind**: instance method of [<code>Arduino</code>](#module_lib/arduino..Arduino)
**Returns**: <code>Promise</code> - Resolves after closing
| Param | Type | Description |

View File

@ -1,9 +1,10 @@
/// <reference types="node" />
import type { EventEmitter } from 'events';
import type { Config } from 'cfg';
/** @module lib/arduino */
/**
* Class representing the arduino communication features
**/
* Class representing the arduino communication features.
*/
export declare class Arduino {
private log;
private eventEmitter;

View File

@ -30,9 +30,10 @@ const KNOWN = [
'/dev/ttyACM0',
'COM3'
];
/** @module lib/arduino */
/**
* Class representing the arduino communication features
**/
* Class representing the arduino communication features.
*/
class Arduino {
constructor(cfg, ee, errorState) {
this.path = {};

File diff suppressed because one or more lines are too long

View File

@ -1,59 +1,76 @@
<a name="Camera"></a>
<a name="module_lib/cam"></a>
## Camera
class representing camera functions
## lib/cam
**Kind**: global class
* [lib/cam](#module_lib/cam)
* [~Camera](#module_lib/cam..Camera)
* [.init()](#module_lib/cam..Camera+init)
* [.listen()](#module_lib/cam..Camera+listen)
* [.set()](#module_lib/cam..Camera+set)
* [.cap()](#module_lib/cam..Camera+cap)
* [.move()](#module_lib/cam..Camera+move)
* [.exposure()](#module_lib/cam..Camera+exposure)
* [.connectIntval()](#module_lib/cam..Camera+connectIntval)
* [.connectProcessing()](#module_lib/cam..Camera+connectProcessing)
* [.listener()](#module_lib/cam..Camera+listener)
* [.end()](#module_lib/cam..Camera+end)
* [Camera](#Camera)
* [.init()](#Camera+init)
* [.listen()](#Camera+listen)
* [.set()](#Camera+set)
* [.cap()](#Camera+cap)
* [.move()](#Camera+move)
* [.exposure()](#Camera+exposure)
* [.connectIntval()](#Camera+connectIntval)
* [.connectProcessing()](#Camera+connectProcessing)
* [.listener()](#Camera+listener)
* [.end()](#Camera+end)
<a name="module_lib/cam..Camera"></a>
<a name="Camera+init"></a>
### lib/cam~Camera
Class representing camera functions.
### camera.init()
**Kind**: instance method of [<code>Camera</code>](#Camera)
<a name="Camera+listen"></a>
**Kind**: inner class of [<code>lib/cam</code>](#module_lib/cam)
### camera.listen()
**Kind**: instance method of [<code>Camera</code>](#Camera)
<a name="Camera+set"></a>
* [~Camera](#module_lib/cam..Camera)
* [.init()](#module_lib/cam..Camera+init)
* [.listen()](#module_lib/cam..Camera+listen)
* [.set()](#module_lib/cam..Camera+set)
* [.cap()](#module_lib/cam..Camera+cap)
* [.move()](#module_lib/cam..Camera+move)
* [.exposure()](#module_lib/cam..Camera+exposure)
* [.connectIntval()](#module_lib/cam..Camera+connectIntval)
* [.connectProcessing()](#module_lib/cam..Camera+connectProcessing)
* [.listener()](#module_lib/cam..Camera+listener)
* [.end()](#module_lib/cam..Camera+end)
### camera.set()
**Kind**: instance method of [<code>Camera</code>](#Camera)
<a name="Camera+cap"></a>
<a name="module_lib/cam..Camera+init"></a>
### camera.cap()
**Kind**: instance method of [<code>Camera</code>](#Camera)
<a name="Camera+move"></a>
#### camera.init()
**Kind**: instance method of [<code>Camera</code>](#module_lib/cam..Camera)
<a name="module_lib/cam..Camera+listen"></a>
### camera.move()
**Kind**: instance method of [<code>Camera</code>](#Camera)
<a name="Camera+exposure"></a>
#### camera.listen()
**Kind**: instance method of [<code>Camera</code>](#module_lib/cam..Camera)
<a name="module_lib/cam..Camera+set"></a>
### camera.exposure()
**Kind**: instance method of [<code>Camera</code>](#Camera)
<a name="Camera+connectIntval"></a>
#### camera.set()
**Kind**: instance method of [<code>Camera</code>](#module_lib/cam..Camera)
<a name="module_lib/cam..Camera+cap"></a>
### camera.connectIntval()
**Kind**: instance method of [<code>Camera</code>](#Camera)
<a name="Camera+connectProcessing"></a>
#### camera.cap()
**Kind**: instance method of [<code>Camera</code>](#module_lib/cam..Camera)
<a name="module_lib/cam..Camera+move"></a>
### camera.connectProcessing()
**Kind**: instance method of [<code>Camera</code>](#Camera)
<a name="Camera+listener"></a>
#### camera.move()
**Kind**: instance method of [<code>Camera</code>](#module_lib/cam..Camera)
<a name="module_lib/cam..Camera+exposure"></a>
### camera.listener()
**Kind**: instance method of [<code>Camera</code>](#Camera)
<a name="Camera+end"></a>
#### camera.exposure()
**Kind**: instance method of [<code>Camera</code>](#module_lib/cam..Camera)
<a name="module_lib/cam..Camera+connectIntval"></a>
### camera.end()
**Kind**: instance method of [<code>Camera</code>](#Camera)
#### camera.connectIntval()
**Kind**: instance method of [<code>Camera</code>](#module_lib/cam..Camera)
<a name="module_lib/cam..Camera+connectProcessing"></a>
#### camera.connectProcessing()
**Kind**: instance method of [<code>Camera</code>](#module_lib/cam..Camera)
<a name="module_lib/cam..Camera+listener"></a>
#### camera.listener()
**Kind**: instance method of [<code>Camera</code>](#module_lib/cam..Camera)
<a name="module_lib/cam..Camera+end"></a>
#### camera.end()
**Kind**: instance method of [<code>Camera</code>](#module_lib/cam..Camera)

View File

@ -7,7 +7,10 @@ interface CameraState {
dir: boolean;
capper: boolean;
}
/** class representing camera functions **/
/** @module lib/cam */
/**
* Class representing camera functions.
*/
export declare class Camera {
state: CameraState;
arduino: Arduino;

View File

@ -6,7 +6,10 @@ const intval_1 = require("intval");
const processing_1 = require("processing");
const delay_1 = require("delay");
const log_1 = require("log");
/** class representing camera functions **/
/** @module lib/cam */
/**
* Class representing camera functions.
*/
class Camera {
/**
*

File diff suppressed because one or more lines are too long

View File

@ -1,34 +1,46 @@
<a name="Capper"></a>
<a name="module_lib/capper"></a>
## Capper
class representing capper functions
## lib/capper
**Kind**: global class
* [lib/capper](#module_lib/capper)
* [~Capper](#module_lib/capper..Capper)
* [.init()](#module_lib/capper..Capper+init)
* [.listen()](#module_lib/capper..Capper+listen)
* [.capper()](#module_lib/capper..Capper+capper)
* [.listener()](#module_lib/capper..Capper+listener)
* [.end()](#module_lib/capper..Capper+end)
* [Capper](#Capper)
* [.init()](#Capper+init)
* [.listen()](#Capper+listen)
* [.capper()](#Capper+capper)
* [.listener()](#Capper+listener)
* [.end()](#Capper+end)
<a name="module_lib/capper..Capper"></a>
<a name="Capper+init"></a>
### lib/capper~Capper
Class representing capper functions.
### capper.init()
**Kind**: instance method of [<code>Capper</code>](#Capper)
<a name="Capper+listen"></a>
**Kind**: inner class of [<code>lib/capper</code>](#module_lib/capper)
### capper.listen()
**Kind**: instance method of [<code>Capper</code>](#Capper)
<a name="Capper+capper"></a>
* [~Capper](#module_lib/capper..Capper)
* [.init()](#module_lib/capper..Capper+init)
* [.listen()](#module_lib/capper..Capper+listen)
* [.capper()](#module_lib/capper..Capper+capper)
* [.listener()](#module_lib/capper..Capper+listener)
* [.end()](#module_lib/capper..Capper+end)
### capper.capper()
**Kind**: instance method of [<code>Capper</code>](#Capper)
<a name="Capper+listener"></a>
<a name="module_lib/capper..Capper+init"></a>
### capper.listener()
**Kind**: instance method of [<code>Capper</code>](#Capper)
<a name="Capper+end"></a>
#### capper.init()
**Kind**: instance method of [<code>Capper</code>](#module_lib/capper..Capper)
<a name="module_lib/capper..Capper+listen"></a>
### capper.end()
**Kind**: instance method of [<code>Capper</code>](#Capper)
#### capper.listen()
**Kind**: instance method of [<code>Capper</code>](#module_lib/capper..Capper)
<a name="module_lib/capper..Capper+capper"></a>
#### capper.capper()
**Kind**: instance method of [<code>Capper</code>](#module_lib/capper..Capper)
<a name="module_lib/capper..Capper+listener"></a>
#### capper.listener()
**Kind**: instance method of [<code>Capper</code>](#module_lib/capper..Capper)
<a name="module_lib/capper..Capper+end"></a>
#### capper.end()
**Kind**: instance method of [<code>Capper</code>](#module_lib/capper..Capper)

View File

@ -4,7 +4,10 @@ import type { WebContents } from 'electron';
interface CapperState {
capper: boolean;
}
/** class representing capper functions **/
/** @module lib/capper */
/**
* Class representing capper functions.
*/
export declare class Capper {
private state;
private arduino;

View File

@ -3,7 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.Capper = void 0;
const electron_1 = require("electron");
const log_1 = require("log");
/** class representing capper functions **/
/** @module lib/capper */
/**
* Class representing capper functions.
*/
class Capper {
/**
*

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/capper/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,uCAAmC;AAInC,6BAA0B;AAW1B,2CAA2C;AAC3C,MAAa,MAAM;IAWlB;;QAEI;IACJ,YAAa,OAAiB,EAAE,GAAS,EAAE,EAAgB,EAAE,OAAiB;QAbtE,UAAK,GAAiB;YAC7B,MAAM,EAAG,KAAK;SACd,CAAC;QACM,YAAO,GAAa,IAAI,CAAC;QAKzB,QAAG,GAAoB,kBAAO,CAAC;QAC/B,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,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,MAAM,EAAE,CAAC;IACf,CAAC;IAED;;QAEI;IACI,MAAM;QACb,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,E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W,EAAE;YACrC,IAAI;gBACH,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;aACrC;YAAC,OAAO,GAAG,EAAE;gBACb,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACpB;SACD;QACD,KAAK,CAAC,WAAW,GAAG,IAAI,CAAA;IACzB,CAAC;IAED;;QAEI;IACI,KAAK,CAAC,GAAG,CAAE,GAAY,EAAE,EAAW,EAAE,EAAW;QACxD,IAAI,OAAO,GAAY,EAAE,CAAC;QAE1B,IAAI,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE;YAC3C,OAAO,GAAG,kBAAkB,CAAC;SAC7B;aAAM,IAAI,GAAG,KAAK,IAAI,CAAC,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,MAAM,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;QACzD,OAAO,EAAE,CAAC;IACX,CAAC;CACD;AA7FD,wBA6FC;AAED,MAAM,CAAC,OAAO,GAAG,EAAE,MAAM,EAAE,CAAA"}

View File

@ -1,10 +1,40 @@
<a name="Assign all connected devices and mock devices as private classes."></a>
<a name="module_lib/cmd"></a>
## Assign all connected devices and mock devices as private classes.
**Kind**: global class
<a name="new_Assign all connected devices and mock devices as private classes._new"></a>
## lib/cmd
### new Assign all connected devices and mock devices as private classes.(cfg, proj, cam, light, alert, cam2, proj2, capper)
* [lib/cmd](#module_lib/cmd)
* [~Assign all connected devices and mock devices as private classes.](#module_lib/cmd..Assign all connected devices and mock devices as private classes.)
* [new Assign all connected devices and mock devices as private classes.(cfg, proj, cam, light, alert, cam2, proj2, capper)](#new_module_lib/cmd..Assign all connected devices and mock devices as private classes._new)
* [~Commands](#module_lib/cmd..Commands)
* [.projector_forward()](#module_lib/cmd..Commands+projector_forward) ⇒ <code>integer</code>
* [.projector_backward()](#module_lib/cmd..Commands+projector_backward) ⇒ <code>integer</code>
* [.camera_forward(cmd)](#module_lib/cmd..Commands+camera_forward) ⇒ <code>integer</code>
* [.black_forward()](#module_lib/cmd..Commands+black_forward) ⇒ <code>integer</code>
* [.camera_backward(cmd)](#module_lib/cmd..Commands+camera_backward) ⇒ <code>integer</code>
* [.black_backward()](#module_lib/cmd..Commands+black_backward) ⇒ <code>integer</code>
* [.camera_second_forward(cmd)](#module_lib/cmd..Commands+camera_second_forward) ⇒ <code>integer</code>
* [.camera_second_backward(cmd)](#module_lib/cmd..Commands+camera_second_backward) ⇒ <code>integer</code>
* [.cameras_forward(cmd)](#module_lib/cmd..Commands+cameras_forward) ⇒ <code>integer</code>
* [.cameras_backward(cmd)](#module_lib/cmd..Commands+cameras_backward) ⇒ <code>integer</code>
* [.camera_forward_camera_second_backward(cmd)](#module_lib/cmd..Commands+camera_forward_camera_second_backward) ⇒ <code>integer</code>
* [.camera_backward_camera_second_forward(cmd)](#module_lib/cmd..Commands+camera_backward_camera_second_forward) ⇒ <code>integer</code>
* [.projector_second_forward()](#module_lib/cmd..Commands+projector_second_forward) ⇒ <code>integer</code>
* [.projector_second_backward()](#module_lib/cmd..Commands+projector_second_backward) ⇒ <code>integer</code>
* [.projectors_forward()](#module_lib/cmd..Commands+projectors_forward) ⇒ <code>integer</code>
* [.projectors_backward()](#module_lib/cmd..Commands+projectors_backward) ⇒ <code>integer</code>
* [.projector_forward_projector_second_backward()](#module_lib/cmd..Commands+projector_forward_projector_second_backward) ⇒ <code>integer</code>
* [.projector_backward_projector_second_forward()](#module_lib/cmd..Commands+projector_backward_projector_second_forward) ⇒ <code>integer</code>
* [.alert()](#module_lib/cmd..Commands+alert) ⇒ <code>integer</code>
* [.pause()](#module_lib/cmd..Commands+pause) ⇒ <code>integer</code>
* [.camera_exposure()](#module_lib/cmd..Commands+camera_exposure)
<a name="module_lib/cmd..Assign all connected devices and mock devices as private classes."></a>
### lib/cmd~Assign all connected devices and mock devices as private classes.
**Kind**: inner class of [<code>lib/cmd</code>](#module_lib/cmd)
<a name="new_module_lib/cmd..Assign all connected devices and mock devices as private classes._new"></a>
#### new Assign all connected devices and mock devices as private classes.(cfg, proj, cam, light, alert, cam2, proj2, capper)
| Param | Type | Description |
| --- | --- | --- |
@ -17,3 +47,221 @@
| proj2 | <code>object</code> | (optional) Projector 2 |
| capper | <code>object</code> | Capper object |
<a name="module_lib/cmd..Commands"></a>
### lib/cmd~Commands
Class representing all commands bundled into methods.
**Kind**: inner class of [<code>lib/cmd</code>](#module_lib/cmd)
* [~Commands](#module_lib/cmd..Commands)
* [.projector_forward()](#module_lib/cmd..Commands+projector_forward) ⇒ <code>integer</code>
* [.projector_backward()](#module_lib/cmd..Commands+projector_backward) ⇒ <code>integer</code>
* [.camera_forward(cmd)](#module_lib/cmd..Commands+camera_forward) ⇒ <code>integer</code>
* [.black_forward()](#module_lib/cmd..Commands+black_forward) ⇒ <code>integer</code>
* [.camera_backward(cmd)](#module_lib/cmd..Commands+camera_backward) ⇒ <code>integer</code>
* [.black_backward()](#module_lib/cmd..Commands+black_backward) ⇒ <code>integer</code>
* [.camera_second_forward(cmd)](#module_lib/cmd..Commands+camera_second_forward) ⇒ <code>integer</code>
* [.camera_second_backward(cmd)](#module_lib/cmd..Commands+camera_second_backward) ⇒ <code>integer</code>
* [.cameras_forward(cmd)](#module_lib/cmd..Commands+cameras_forward) ⇒ <code>integer</code>
* [.cameras_backward(cmd)](#module_lib/cmd..Commands+cameras_backward) ⇒ <code>integer</code>
* [.camera_forward_camera_second_backward(cmd)](#module_lib/cmd..Commands+camera_forward_camera_second_backward) ⇒ <code>integer</code>
* [.camera_backward_camera_second_forward(cmd)](#module_lib/cmd..Commands+camera_backward_camera_second_forward) ⇒ <code>integer</code>
* [.projector_second_forward()](#module_lib/cmd..Commands+projector_second_forward) ⇒ <code>integer</code>
* [.projector_second_backward()](#module_lib/cmd..Commands+projector_second_backward) ⇒ <code>integer</code>
* [.projectors_forward()](#module_lib/cmd..Commands+projectors_forward) ⇒ <code>integer</code>
* [.projectors_backward()](#module_lib/cmd..Commands+projectors_backward) ⇒ <code>integer</code>
* [.projector_forward_projector_second_backward()](#module_lib/cmd..Commands+projector_forward_projector_second_backward) ⇒ <code>integer</code>
* [.projector_backward_projector_second_forward()](#module_lib/cmd..Commands+projector_backward_projector_second_forward) ⇒ <code>integer</code>
* [.alert()](#module_lib/cmd..Commands+alert) ⇒ <code>integer</code>
* [.pause()](#module_lib/cmd..Commands+pause) ⇒ <code>integer</code>
* [.camera_exposure()](#module_lib/cmd..Commands+camera_exposure)
<a name="module_lib/cmd..Commands+projector_forward"></a>
#### commands.projector\_forward() ⇒ <code>integer</code>
Move the projector one frame forward
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
<a name="module_lib/cmd..Commands+projector_backward"></a>
#### commands.projector\_backward() ⇒ <code>integer</code>
Move the projector one frame backward
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
<a name="module_lib/cmd..Commands+camera_forward"></a>
#### commands.camera\_forward(cmd) ⇒ <code>integer</code>
Move the camera one frame forward
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
| Param | Type | Description |
| --- | --- | --- |
| cmd | <code>object</code> | Full cmd object |
<a name="module_lib/cmd..Commands+black_forward"></a>
#### commands.black\_forward() ⇒ <code>integer</code>
Move the camera one frame forward with light off
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
<a name="module_lib/cmd..Commands+camera_backward"></a>
#### commands.camera\_backward(cmd) ⇒ <code>integer</code>
Move the camera one frame backward
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
| Param | Type | Description |
| --- | --- | --- |
| cmd | <code>object</code> | Full cmd object |
<a name="module_lib/cmd..Commands+black_backward"></a>
#### commands.black\_backward() ⇒ <code>integer</code>
Move the camera one frame forward, light set to black or off
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
<a name="module_lib/cmd..Commands+camera_second_forward"></a>
#### commands.camera\_second\_forward(cmd) ⇒ <code>integer</code>
Move the second camera one frame forward
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
| Param | Type | Description |
| --- | --- | --- |
| cmd | <code>object</code> | Full cmd object |
<a name="module_lib/cmd..Commands+camera_second_backward"></a>
#### commands.camera\_second\_backward(cmd) ⇒ <code>integer</code>
Move the second camera one frame backward
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
| Param | Type | Description |
| --- | --- | --- |
| cmd | <code>object</code> | Full cmd object |
<a name="module_lib/cmd..Commands+cameras_forward"></a>
#### commands.cameras\_forward(cmd) ⇒ <code>integer</code>
Move the both cameras one frame forward
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
| Param | Type | Description |
| --- | --- | --- |
| cmd | <code>object</code> | Full cmd object |
<a name="module_lib/cmd..Commands+cameras_backward"></a>
#### commands.cameras\_backward(cmd) ⇒ <code>integer</code>
Move the both cameras one frame backward
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
| Param | Type | Description |
| --- | --- | --- |
| cmd | <code>object</code> | Full cmd object |
<a name="module_lib/cmd..Commands+camera_forward_camera_second_backward"></a>
#### commands.camera\_forward\_camera\_second\_backward(cmd) ⇒ <code>integer</code>
Move first camera one frame forward and rewind secondary camera one frame backward
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
| Param | Type | Description |
| --- | --- | --- |
| cmd | <code>object</code> | Full cmd object |
<a name="module_lib/cmd..Commands+camera_backward_camera_second_forward"></a>
#### commands.camera\_backward\_camera\_second\_forward(cmd) ⇒ <code>integer</code>
Rewind first camera one frame backward and move secondary camera one frame forward
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
| Param | Type | Description |
| --- | --- | --- |
| cmd | <code>object</code> | Full cmd object |
<a name="module_lib/cmd..Commands+projector_second_forward"></a>
#### commands.projector\_second\_forward() ⇒ <code>integer</code>
Move the secondary projector forward one frame
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
<a name="module_lib/cmd..Commands+projector_second_backward"></a>
#### commands.projector\_second\_backward() ⇒ <code>integer</code>
Rewind the secondary projector backward one frame
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
<a name="module_lib/cmd..Commands+projectors_forward"></a>
#### commands.projectors\_forward() ⇒ <code>integer</code>
Move the both projectors forward one frame
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
<a name="module_lib/cmd..Commands+projectors_backward"></a>
#### commands.projectors\_backward() ⇒ <code>integer</code>
Rewind both projectors backwards one frame
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
<a name="module_lib/cmd..Commands+projector_forward_projector_second_backward"></a>
#### commands.projector\_forward\_projector\_second\_backward() ⇒ <code>integer</code>
Move the primary projector forward one frame and rewind the secondary projector
one frame backwards.
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
<a name="module_lib/cmd..Commands+projector_backward_projector_second_forward"></a>
#### commands.projector\_backward\_projector\_second\_forward() ⇒ <code>integer</code>
Rewind the primary projector backwards one frame and move the secondary
projector forward one frame.
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
<a name="module_lib/cmd..Commands+alert"></a>
#### commands.alert() ⇒ <code>integer</code>
Throws an alert to pause a sequence
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
<a name="module_lib/cmd..Commands+pause"></a>
#### commands.pause() ⇒ <code>integer</code>
Pauses a sequence for a length of time
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)
**Returns**: <code>integer</code> - Length of action in ms
<a name="module_lib/cmd..Commands+camera_exposure"></a>
#### commands.camera\_exposure()
Sets the camera exposure (if supported).
**Kind**: instance method of [<code>Commands</code>](#module_lib/cmd..Commands)

View File

@ -4,6 +4,10 @@ import type { Light } from 'light';
import type { Capper } from 'capper';
import type { Alert } from 'alert';
import type { Config } from 'cfg';
/** @module lib/cmd */
/**
* Class representing all commands bundled into methods.
*/
export declare class Commands {
proj: Projector;
cam: Camera;

View File

@ -4,6 +4,10 @@ exports.Commands = void 0;
const electron_1 = require("electron");
const uuid_1 = require("uuid");
const delay_1 = require("delay");
/** @module lib/cmd */
/**
* Class representing all commands bundled into methods.
*/
class Commands {
/**
* @constructor

File diff suppressed because one or more lines are too long

View File

@ -1,94 +1,116 @@
<a name="Devices"></a>
<a name="module_lib/devices"></a>
## Devices
class representing the device discovery features
## lib/devices
**Kind**: global class
* [lib/devices](#module_lib/devices)
* [~Devices](#module_lib/devices..Devices)
* [new Devices()](#new_module_lib/devices..Devices_new)
* [.init()](#module_lib/devices..Devices+init)
* [.listen()](#module_lib/devices..Devices+listen)
* [.listener()](#module_lib/devices..Devices+listener)
* [.enumerate()](#module_lib/devices..Devices+enumerate)
* [.favor()](#module_lib/devices..Devices+favor)
* [.distinguish()](#module_lib/devices..Devices+distinguish)
* [.fakeProjector()](#module_lib/devices..Devices+fakeProjector)
* [.fakeCamera()](#module_lib/devices..Devices+fakeCamera)
* [.fakeLight()](#module_lib/devices..Devices+fakeLight)
* [.fakeCapper()](#module_lib/devices..Devices+fakeCapper)
* [.connectDevice()](#module_lib/devices..Devices+connectDevice)
* [.all()](#module_lib/devices..Devices+all)
* [.remember()](#module_lib/devices..Devices+remember)
* [.ready()](#module_lib/devices..Devices+ready)
* [Devices](#Devices)
* [new Devices()](#new_Devices_new)
* [.init()](#Devices+init)
* [.listen()](#Devices+listen)
* [.listener()](#Devices+listener)
* [.enumerate()](#Devices+enumerate)
* [.favor()](#Devices+favor)
* [.distinguish()](#Devices+distinguish)
* [.fakeProjector()](#Devices+fakeProjector)
* [.fakeCamera()](#Devices+fakeCamera)
* [.fakeLight()](#Devices+fakeLight)
* [.fakeCapper()](#Devices+fakeCapper)
* [.connectDevice()](#Devices+connectDevice)
* [.all()](#Devices+all)
* [.remember()](#Devices+remember)
* [.ready()](#Devices+ready)
<a name="module_lib/devices..Devices"></a>
<a name="new_Devices_new"></a>
### lib/devices~Devices
Class representing the device discovery features.
### new Devices()
**Kind**: inner class of [<code>lib/devices</code>](#module_lib/devices)
* [~Devices](#module_lib/devices..Devices)
* [new Devices()](#new_module_lib/devices..Devices_new)
* [.init()](#module_lib/devices..Devices+init)
* [.listen()](#module_lib/devices..Devices+listen)
* [.listener()](#module_lib/devices..Devices+listener)
* [.enumerate()](#module_lib/devices..Devices+enumerate)
* [.favor()](#module_lib/devices..Devices+favor)
* [.distinguish()](#module_lib/devices..Devices+distinguish)
* [.fakeProjector()](#module_lib/devices..Devices+fakeProjector)
* [.fakeCamera()](#module_lib/devices..Devices+fakeCamera)
* [.fakeLight()](#module_lib/devices..Devices+fakeLight)
* [.fakeCapper()](#module_lib/devices..Devices+fakeCapper)
* [.connectDevice()](#module_lib/devices..Devices+connectDevice)
* [.all()](#module_lib/devices..Devices+all)
* [.remember()](#module_lib/devices..Devices+remember)
* [.ready()](#module_lib/devices..Devices+ready)
<a name="new_module_lib/devices..Devices_new"></a>
#### new Devices()
Constructor assigns arduino, settings, UI browser window and cam objects
locally to this class for reference.
<a name="Devices+init"></a>
<a name="module_lib/devices..Devices+init"></a>
### devices.init()
#### devices.init()
Initialize the log for "devices". Establish an ipc connection to the UI.
Start listening on that ipc connection.
**Kind**: instance method of [<code>Devices</code>](#Devices)
<a name="Devices+listen"></a>
**Kind**: instance method of [<code>Devices</code>](#module_lib/devices..Devices)
<a name="module_lib/devices..Devices+listen"></a>
### devices.listen()
#### devices.listen()
Listen to the "profile" channel for messages from the UI.
**Kind**: instance method of [<code>Devices</code>](#Devices)
<a name="Devices+listener"></a>
**Kind**: instance method of [<code>Devices</code>](#module_lib/devices..Devices)
<a name="module_lib/devices..Devices+listener"></a>
### devices.listener()
#### devices.listener()
The "profile" channel callback. If a profile is changed, set it in the
local settings object.
**Kind**: instance method of [<code>Devices</code>](#Devices)
<a name="Devices+enumerate"></a>
**Kind**: instance method of [<code>Devices</code>](#module_lib/devices..Devices)
<a name="module_lib/devices..Devices+enumerate"></a>
### devices.enumerate()
**Kind**: instance method of [<code>Devices</code>](#Devices)
<a name="Devices+favor"></a>
#### devices.enumerate()
**Kind**: instance method of [<code>Devices</code>](#module_lib/devices..Devices)
<a name="module_lib/devices..Devices+favor"></a>
### devices.favor()
**Kind**: instance method of [<code>Devices</code>](#Devices)
<a name="Devices+distinguish"></a>
#### devices.favor()
**Kind**: instance method of [<code>Devices</code>](#module_lib/devices..Devices)
<a name="module_lib/devices..Devices+distinguish"></a>
### devices.distinguish()
**Kind**: instance method of [<code>Devices</code>](#Devices)
<a name="Devices+fakeProjector"></a>
#### devices.distinguish()
**Kind**: instance method of [<code>Devices</code>](#module_lib/devices..Devices)
<a name="module_lib/devices..Devices+fakeProjector"></a>
### devices.fakeProjector()
**Kind**: instance method of [<code>Devices</code>](#Devices)
<a name="Devices+fakeCamera"></a>
#### devices.fakeProjector()
**Kind**: instance method of [<code>Devices</code>](#module_lib/devices..Devices)
<a name="module_lib/devices..Devices+fakeCamera"></a>
### devices.fakeCamera()
**Kind**: instance method of [<code>Devices</code>](#Devices)
<a name="Devices+fakeLight"></a>
#### devices.fakeCamera()
**Kind**: instance method of [<code>Devices</code>](#module_lib/devices..Devices)
<a name="module_lib/devices..Devices+fakeLight"></a>
### devices.fakeLight()
**Kind**: instance method of [<code>Devices</code>](#Devices)
<a name="Devices+fakeCapper"></a>
#### devices.fakeLight()
**Kind**: instance method of [<code>Devices</code>](#module_lib/devices..Devices)
<a name="module_lib/devices..Devices+fakeCapper"></a>
### devices.fakeCapper()
**Kind**: instance method of [<code>Devices</code>](#Devices)
<a name="Devices+connectDevice"></a>
#### devices.fakeCapper()
**Kind**: instance method of [<code>Devices</code>](#module_lib/devices..Devices)
<a name="module_lib/devices..Devices+connectDevice"></a>
### devices.connectDevice()
**Kind**: instance method of [<code>Devices</code>](#Devices)
<a name="Devices+all"></a>
#### devices.connectDevice()
**Kind**: instance method of [<code>Devices</code>](#module_lib/devices..Devices)
<a name="module_lib/devices..Devices+all"></a>
### devices.all()
**Kind**: instance method of [<code>Devices</code>](#Devices)
<a name="Devices+remember"></a>
#### devices.all()
**Kind**: instance method of [<code>Devices</code>](#module_lib/devices..Devices)
<a name="module_lib/devices..Devices+remember"></a>
### devices.remember()
**Kind**: instance method of [<code>Devices</code>](#Devices)
<a name="Devices+ready"></a>
#### devices.remember()
**Kind**: instance method of [<code>Devices</code>](#module_lib/devices..Devices)
<a name="module_lib/devices..Devices+ready"></a>
### devices.ready()
**Kind**: instance method of [<code>Devices</code>](#Devices)
#### devices.ready()
**Kind**: instance method of [<code>Devices</code>](#module_lib/devices..Devices)

View File

@ -5,11 +5,10 @@ interface Device {
serial: string;
device: string;
}
/** @module lib/devices */
/**
* class representing the device discovery features
*
*
**/
* Class representing the device discovery features.
*/
export declare class Devices {
settings: Settings;
connected: any;

View File

@ -4,11 +4,10 @@ exports.Devices = void 0;
const electron_1 = require("electron");
const delay_1 = require("delay");
const log_1 = require("log");
/** @module lib/devices */
/**
* class representing the device discovery features
*
*
**/
* Class representing the device discovery features.
*/
class Devices {
/**
* Constructor assigns arduino, settings, UI browser window and cam objects

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,9 @@
<a name="display
Provides features for displaying a full screen display of images for the digital module.module_"></a>
<a name="module_lib/display"></a>
## display
## lib/display
<a name="module_lib/display..electron_1"></a>
### lib/display~electron\_1
Provides features for displaying a full screen display of images for the digital module.
**Kind**: inner constant of [<code>lib/display</code>](#module_lib/display)

View File

@ -2,7 +2,8 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.Display = void 0;
/**
* @module display
* @module lib/display */
/**
* Provides features for displaying a full screen display of images for the digital module.
**/
const electron_1 = require("electron");

File diff suppressed because one or more lines are too long

View File

@ -1,120 +1,37 @@
## Modules
<dl>
<dt><a href="#module_ffmpeg">ffmpeg</a></dt>
<dd></dd>
<dt><a href="#module_lib/ffmpeg">lib/ffmpeg</a></dt>
<dd></dd>
</dl>
<a name="module_ffmpeg"></a>
## ffmpeg
<a name="module_lib/ffmpeg"></a>
* [ffmpeg](#module_ffmpeg)
* [~FFMPEG](#module_ffmpeg..FFMPEG)
* [.init()](#module_ffmpeg..FFMPEG+init)
* [.padded_frame(i)](#module_ffmpeg..FFMPEG+padded_frame) ⇒ <code>string</code>
* [.parseStderr(line)](#module_ffmpeg..FFMPEG+parseStderr)
* [.frame(state, light)](#module_ffmpeg..FFMPEG+frame) ⇒ <code>string</code>
* [.frames(video, obj)](#module_ffmpeg..FFMPEG+frames) ⇒ <code>?</code>
* [.clear(frame)](#module_ffmpeg..FFMPEG+clear) ⇒ <code>boolean</code>
* [.clearAll()](#module_ffmpeg..FFMPEG+clearAll)
* [.checkDir()](#module_ffmpeg..FFMPEG+checkDir)
* [~Creates an ffmpeg class](#module_ffmpeg..Creates an ffmpeg class)
* [new Creates an ffmpeg class(sys)](#new_module_ffmpeg..Creates an ffmpeg class_new)
## lib/ffmpeg
<a name="module_ffmpeg..FFMPEG"></a>
* [lib/ffmpeg](#module_lib/ffmpeg)
* [~Creates an ffmpeg class](#module_lib/ffmpeg..Creates an ffmpeg class)
* [new Creates an ffmpeg class(sys)](#new_module_lib/ffmpeg..Creates an ffmpeg class_new)
* [~FFMPEG](#module_lib/ffmpeg..FFMPEG)
* [.init()](#module_lib/ffmpeg..FFMPEG+init)
* [.padded_frame(i)](#module_lib/ffmpeg..FFMPEG+padded_frame) ⇒ <code>string</code>
* [.parseStderr(line)](#module_lib/ffmpeg..FFMPEG+parseStderr)
* [.frame(state, light)](#module_lib/ffmpeg..FFMPEG+frame) ⇒ <code>string</code>
* [.frames(video, obj)](#module_lib/ffmpeg..FFMPEG+frames) ⇒ <code>?</code>
* [.clear(frame)](#module_lib/ffmpeg..FFMPEG+clear) ⇒ <code>boolean</code>
* [.clearAll()](#module_lib/ffmpeg..FFMPEG+clearAll)
* [.checkDir()](#module_lib/ffmpeg..FFMPEG+checkDir)
### ffmpeg~FFMPEG
**Kind**: inner class of [<code>ffmpeg</code>](#module_ffmpeg)
<a name="module_lib/ffmpeg..Creates an ffmpeg class"></a>
* [~FFMPEG](#module_ffmpeg..FFMPEG)
* [.init()](#module_ffmpeg..FFMPEG+init)
* [.padded_frame(i)](#module_ffmpeg..FFMPEG+padded_frame) ⇒ <code>string</code>
* [.parseStderr(line)](#module_ffmpeg..FFMPEG+parseStderr)
* [.frame(state, light)](#module_ffmpeg..FFMPEG+frame) ⇒ <code>string</code>
* [.frames(video, obj)](#module_ffmpeg..FFMPEG+frames) ⇒ <code>?</code>
* [.clear(frame)](#module_ffmpeg..FFMPEG+clear) ⇒ <code>boolean</code>
* [.clearAll()](#module_ffmpeg..FFMPEG+clearAll)
* [.checkDir()](#module_ffmpeg..FFMPEG+checkDir)
<a name="module_ffmpeg..FFMPEG+init"></a>
#### ffmpeG.init()
Async method to call async functions from constructor
**Kind**: instance method of [<code>FFMPEG</code>](#module_ffmpeg..FFMPEG)
<a name="module_ffmpeg..FFMPEG+padded_frame"></a>
#### ffmpeG.padded\_frame(i) ⇒ <code>string</code>
Add padding to a number to 5 places. Return a string.
**Kind**: instance method of [<code>FFMPEG</code>](#module_ffmpeg..FFMPEG)
**Returns**: <code>string</code> - Padded string
| Param | Type | Description |
| --- | --- | --- |
| i | <code>integer</code> | Integer to pad |
<a name="module_ffmpeg..FFMPEG+parseStderr"></a>
#### ffmpeG.parseStderr(line)
Parse the stderr output of ffmpeg
**Kind**: instance method of [<code>FFMPEG</code>](#module_ffmpeg..FFMPEG)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | Stderr line |
<a name="module_ffmpeg..FFMPEG+frame"></a>
#### ffmpeG.frame(state, light) ⇒ <code>string</code>
Render a single frame from a video or image to a png.
**Kind**: instance method of [<code>FFMPEG</code>](#module_ffmpeg..FFMPEG)
**Returns**: <code>string</code> - Path of frame
| Param | Type | Description |
| --- | --- | --- |
| state | <code>object</code> | State object containing file data |
| light | <code>object</code> | Object containing color information for frame |
<a name="module_ffmpeg..FFMPEG+frames"></a>
#### ffmpeG.frames(video, obj) ⇒ <code>?</code>
Render all frames in a video to the temp directory.
Not in use.
**Kind**: instance method of [<code>FFMPEG</code>](#module_ffmpeg..FFMPEG)
| Param | Type | Description |
| --- | --- | --- |
| video | <code>string</code> | Path to video |
| obj | <code>object</code> | Not sure |
<a name="module_ffmpeg..FFMPEG+clear"></a>
#### ffmpeG.clear(frame) ⇒ <code>boolean</code>
Clears a specific frame from the tmp directory
**Kind**: instance method of [<code>FFMPEG</code>](#module_ffmpeg..FFMPEG)
**Returns**: <code>boolean</code> - True if successful, false if not
| Param | Type | Description |
| --- | --- | --- |
| frame | <code>integer</code> | Integer of frame to clear |
<a name="module_ffmpeg..FFMPEG+clearAll"></a>
#### ffmpeG.clearAll()
Deletes all frames in temp directory.
**Kind**: instance method of [<code>FFMPEG</code>](#module_ffmpeg..FFMPEG)
<a name="module_ffmpeg..FFMPEG+checkDir"></a>
#### ffmpeG.checkDir()
Checks if mcopy temp directory exists. If it doesn't,
creates it.
**Kind**: instance method of [<code>FFMPEG</code>](#module_ffmpeg..FFMPEG)
<a name="module_ffmpeg..Creates an ffmpeg class"></a>
### ffmpeg~Creates an ffmpeg class
**Kind**: inner class of [<code>ffmpeg</code>](#module_ffmpeg)
<a name="new_module_ffmpeg..Creates an ffmpeg class_new"></a>
### lib/ffmpeg~Creates an ffmpeg class
**Kind**: inner class of [<code>lib/ffmpeg</code>](#module_lib/ffmpeg)
<a name="new_module_lib/ffmpeg..Creates an ffmpeg class_new"></a>
#### new Creates an ffmpeg class(sys)
@ -122,3 +39,100 @@ creates it.
| --- | --- | --- |
| sys | <code>object</code> | System object to be used to get temp directory |
<a name="module_lib/ffmpeg..FFMPEG"></a>
### lib/ffmpeg~FFMPEG
Class representing all ffmpeg features.
**Kind**: inner class of [<code>lib/ffmpeg</code>](#module_lib/ffmpeg)
* [~FFMPEG](#module_lib/ffmpeg..FFMPEG)
* [.init()](#module_lib/ffmpeg..FFMPEG+init)
* [.padded_frame(i)](#module_lib/ffmpeg..FFMPEG+padded_frame) ⇒ <code>string</code>
* [.parseStderr(line)](#module_lib/ffmpeg..FFMPEG+parseStderr)
* [.frame(state, light)](#module_lib/ffmpeg..FFMPEG+frame) ⇒ <code>string</code>
* [.frames(video, obj)](#module_lib/ffmpeg..FFMPEG+frames) ⇒ <code>?</code>
* [.clear(frame)](#module_lib/ffmpeg..FFMPEG+clear) ⇒ <code>boolean</code>
* [.clearAll()](#module_lib/ffmpeg..FFMPEG+clearAll)
* [.checkDir()](#module_lib/ffmpeg..FFMPEG+checkDir)
<a name="module_lib/ffmpeg..FFMPEG+init"></a>
#### ffmpeG.init()
Async method to call async functions from constructor
**Kind**: instance method of [<code>FFMPEG</code>](#module_lib/ffmpeg..FFMPEG)
<a name="module_lib/ffmpeg..FFMPEG+padded_frame"></a>
#### ffmpeG.padded\_frame(i) ⇒ <code>string</code>
Add padding to a number to 5 places. Return a string.
**Kind**: instance method of [<code>FFMPEG</code>](#module_lib/ffmpeg..FFMPEG)
**Returns**: <code>string</code> - Padded string
| Param | Type | Description |
| --- | --- | --- |
| i | <code>integer</code> | Integer to pad |
<a name="module_lib/ffmpeg..FFMPEG+parseStderr"></a>
#### ffmpeG.parseStderr(line)
Parse the stderr output of ffmpeg
**Kind**: instance method of [<code>FFMPEG</code>](#module_lib/ffmpeg..FFMPEG)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | Stderr line |
<a name="module_lib/ffmpeg..FFMPEG+frame"></a>
#### ffmpeG.frame(state, light) ⇒ <code>string</code>
Render a single frame from a video or image to a png.
**Kind**: instance method of [<code>FFMPEG</code>](#module_lib/ffmpeg..FFMPEG)
**Returns**: <code>string</code> - Path of frame
| Param | Type | Description |
| --- | --- | --- |
| state | <code>object</code> | State object containing file data |
| light | <code>object</code> | Object containing color information for frame |
<a name="module_lib/ffmpeg..FFMPEG+frames"></a>
#### ffmpeG.frames(video, obj) ⇒ <code>?</code>
Render all frames in a video to the temp directory.
Not in use.
**Kind**: instance method of [<code>FFMPEG</code>](#module_lib/ffmpeg..FFMPEG)
| Param | Type | Description |
| --- | --- | --- |
| video | <code>string</code> | Path to video |
| obj | <code>object</code> | Not sure |
<a name="module_lib/ffmpeg..FFMPEG+clear"></a>
#### ffmpeG.clear(frame) ⇒ <code>boolean</code>
Clears a specific frame from the tmp directory
**Kind**: instance method of [<code>FFMPEG</code>](#module_lib/ffmpeg..FFMPEG)
**Returns**: <code>boolean</code> - True if successful, false if not
| Param | Type | Description |
| --- | --- | --- |
| frame | <code>integer</code> | Integer of frame to clear |
<a name="module_lib/ffmpeg..FFMPEG+clearAll"></a>
#### ffmpeG.clearAll()
Deletes all frames in temp directory.
**Kind**: instance method of [<code>FFMPEG</code>](#module_lib/ffmpeg..FFMPEG)
<a name="module_lib/ffmpeg..FFMPEG+checkDir"></a>
#### ffmpeG.checkDir()
Checks if mcopy temp directory exists. If it doesn't,
creates it.
**Kind**: instance method of [<code>FFMPEG</code>](#module_lib/ffmpeg..FFMPEG)

View File

@ -11,7 +11,10 @@ interface StdErr {
progress?: number;
estimated?: number;
}
/** @class FFMPEG **/
/** @module lib/ffmpeg */
/**
* Class representing all ffmpeg features.
*/
export declare class FFMPEG {
private bin;
private log;

View File

@ -7,7 +7,10 @@ const fs_extra_1 = require("fs-extra");
const exec_1 = require("exec");
const child_process_1 = require("child_process");
const log_1 = require("log");
/** @class FFMPEG **/
/** @module lib/ffmpeg */
/**
* Class representing all ffmpeg features.
*/
class FFMPEG {
/**
* @constructor

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,54 @@
<a name="module_FFPROBE"></a>
<a name="module_lib/ffprobe"></a>
## lib/ffprobe
* [lib/ffprobe](#module_lib/ffprobe)
* [~FFPROBE](#module_lib/ffprobe..FFPROBE)
* [.parseFps()](#module_lib/ffprobe..FFPROBE+parseFps)
* [.info(video)](#module_lib/ffprobe..FFPROBE+info) ⇒ <code>object</code>
* [.frames(video)](#module_lib/ffprobe..FFPROBE+frames) ⇒ <code>integer</code>
<a name="module_lib/ffprobe..FFPROBE"></a>
### lib/ffprobe~FFPROBE
Class representing all ffprobe features.
**Kind**: inner class of [<code>lib/ffprobe</code>](#module_lib/ffprobe)
* [~FFPROBE](#module_lib/ffprobe..FFPROBE)
* [.parseFps()](#module_lib/ffprobe..FFPROBE+parseFps)
* [.info(video)](#module_lib/ffprobe..FFPROBE+info) ⇒ <code>object</code>
* [.frames(video)](#module_lib/ffprobe..FFPROBE+frames) ⇒ <code>integer</code>
<a name="module_lib/ffprobe..FFPROBE+parseFps"></a>
#### ffprobE.parseFps()
Parse the fps entry into a float representing the fps of a video
**Kind**: instance method of [<code>FFPROBE</code>](#module_lib/ffprobe..FFPROBE)
<a name="module_lib/ffprobe..FFPROBE+info"></a>
#### ffprobE.info(video) ⇒ <code>object</code>
Get info on a video in json format. Use for filmout.
**Kind**: instance method of [<code>FFPROBE</code>](#module_lib/ffprobe..FFPROBE)
**Returns**: <code>object</code> - Video info in an object
| Param | Type | Description |
| --- | --- | --- |
| video | <code>string</code> | Path to video |
<a name="module_lib/ffprobe..FFPROBE+frames"></a>
#### ffprobE.frames(video) ⇒ <code>integer</code>
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.
**Kind**: instance method of [<code>FFPROBE</code>](#module_lib/ffprobe..FFPROBE)
**Returns**: <code>integer</code> - Number of frames in video
| Param | Type | Description |
| --- | --- | --- |
| video | <code>string</code> | Path to video |
## FFPROBE

View File

@ -1,4 +1,8 @@
import type { System } from 'system';
/** @module lib/ffprobe */
/**
* Class representing all ffprobe features.
*/
export declare class FFPROBE {
private bin;
private log;

View File

@ -1,11 +1,14 @@
'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");
/** @module lib/ffprobe */
/**
* Class representing all ffprobe features.
*/
class FFPROBE {
constructor(sys) {
this.bin = sys.deps.ffprobe;

View File

@ -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;AAI1B,MAAa,OAAO;IAInB,YAAa,GAAY;QACxB,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;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AAC,GAAG,CAAC,CAAC;SACtB;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;AA3ID,0BA2IC;AAED;;;;EAIE;AAEF,MAAM,CAAC,OAAO,GAAG,EAAE,OAAO,EAAE,CAAC"}

View File

@ -1,3 +1,227 @@
<a name="module_FilmOut"></a>
<a name="module_lib/filmout"></a>
## FilmOut
## lib/filmout
* [lib/filmout](#module_lib/filmout)
* [~FilmOut](#module_lib/filmout..FilmOut)
* [.init()](#module_lib/filmout..FilmOut+init)
* [.listen()](#module_lib/filmout..FilmOut+listen)
* [.hash(data)](#module_lib/filmout..FilmOut+hash)
* [.set(dir)](#module_lib/filmout..FilmOut+set)
* [.move()](#module_lib/filmout..FilmOut+move) ⇒ <code>number</code>
* [.start()](#module_lib/filmout..FilmOut+start)
* [.end()](#module_lib/filmout..FilmOut+end)
* [.onConnect(evt, arg)](#module_lib/filmout..FilmOut+onConnect) ⇒ <code>boolean</code>
* [.onPreExport(evt, arg)](#module_lib/filmout..FilmOut+onPreExport) ⇒ <code>any</code>
* [.isGifAnimated(pathStr)](#module_lib/filmout..FilmOut+isGifAnimated) ⇒ <code>boolean</code>
* [.stillInfo(pathStr)](#module_lib/filmout..FilmOut+stillInfo) ⇒ <code>object</code>
* [.dirInfo(images)](#module_lib/filmout..FilmOut+dirInfo) ⇒ <code>object</code>
* [.dirList(pathStr)](#module_lib/filmout..FilmOut+dirList) ⇒ <code>array</code>
* [.previewFrame(evt, arg)](#module_lib/filmout..FilmOut+previewFrame)
* [.preview(evt, arg)](#module_lib/filmout..FilmOut+preview)
* [.focus()](#module_lib/filmout..FilmOut+focus)
* [.field()](#module_lib/filmout..FilmOut+field)
* [.meter()](#module_lib/filmout..FilmOut+meter)
* [.close()](#module_lib/filmout..FilmOut+close)
* [.onDisplay()](#module_lib/filmout..FilmOut+onDisplay)
<a name="module_lib/filmout..FilmOut"></a>
### lib/filmout~FilmOut
Class representing all filmout features.
**Kind**: inner class of [<code>lib/filmout</code>](#module_lib/filmout)
* [~FilmOut](#module_lib/filmout..FilmOut)
* [.init()](#module_lib/filmout..FilmOut+init)
* [.listen()](#module_lib/filmout..FilmOut+listen)
* [.hash(data)](#module_lib/filmout..FilmOut+hash)
* [.set(dir)](#module_lib/filmout..FilmOut+set)
* [.move()](#module_lib/filmout..FilmOut+move) ⇒ <code>number</code>
* [.start()](#module_lib/filmout..FilmOut+start)
* [.end()](#module_lib/filmout..FilmOut+end)
* [.onConnect(evt, arg)](#module_lib/filmout..FilmOut+onConnect) ⇒ <code>boolean</code>
* [.onPreExport(evt, arg)](#module_lib/filmout..FilmOut+onPreExport) ⇒ <code>any</code>
* [.isGifAnimated(pathStr)](#module_lib/filmout..FilmOut+isGifAnimated) ⇒ <code>boolean</code>
* [.stillInfo(pathStr)](#module_lib/filmout..FilmOut+stillInfo) ⇒ <code>object</code>
* [.dirInfo(images)](#module_lib/filmout..FilmOut+dirInfo) ⇒ <code>object</code>
* [.dirList(pathStr)](#module_lib/filmout..FilmOut+dirList) ⇒ <code>array</code>
* [.previewFrame(evt, arg)](#module_lib/filmout..FilmOut+previewFrame)
* [.preview(evt, arg)](#module_lib/filmout..FilmOut+preview)
* [.focus()](#module_lib/filmout..FilmOut+focus)
* [.field()](#module_lib/filmout..FilmOut+field)
* [.meter()](#module_lib/filmout..FilmOut+meter)
* [.close()](#module_lib/filmout..FilmOut+close)
* [.onDisplay()](#module_lib/filmout..FilmOut+onDisplay)
<a name="module_lib/filmout..FilmOut+init"></a>
#### filmOut.init()
Async function for requiring log, ipcMain and bind events.
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
<a name="module_lib/filmout..FilmOut+listen"></a>
#### filmOut.listen()
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
<a name="module_lib/filmout..FilmOut+hash"></a>
#### filmOut.hash(data)
Create a hash of a string.
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
| Param | Type | Description |
| --- | --- | --- |
| data | <code>string</code> | Data to produce hash of |
<a name="module_lib/filmout..FilmOut+set"></a>
#### filmOut.set(dir)
Sets filmout direction.
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
| Param | Type | Description |
| --- | --- | --- |
| dir | <code>boolean</code> | Direction of filmout |
<a name="module_lib/filmout..FilmOut+move"></a>
#### filmOut.move() ⇒ <code>number</code>
Moves filmout a frame at a time.
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
**Returns**: <code>number</code> - Time since start
<a name="module_lib/filmout..FilmOut+start"></a>
#### filmOut.start()
Begin the process of exporting single frames from the video for display.
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
<a name="module_lib/filmout..FilmOut+end"></a>
#### filmOut.end()
Ends the filmout process and closes the display.
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
<a name="module_lib/filmout..FilmOut+onConnect"></a>
#### filmOut.onConnect(evt, arg) ⇒ <code>boolean</code>
Use a video file as a film out source on "projector"
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
**Returns**: <code>boolean</code> - Success state
| Param | Type | Description |
| --- | --- | --- |
| evt | <code>object</code> | Original connect event |
| arg | <code>object</code> | Arguments from ipc message |
<a name="module_lib/filmout..FilmOut+onPreExport"></a>
#### filmOut.onPreExport(evt, arg) ⇒ <code>any</code>
Pre-export all frames from video for display.
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
**Returns**: <code>any</code> - UI send call
| Param | Type | Description |
| --- | --- | --- |
| evt | <code>object</code> | IPC event |
| arg | <code>object</code> | IPC args |
<a name="module_lib/filmout..FilmOut+isGifAnimated"></a>
#### filmOut.isGifAnimated(pathStr) ⇒ <code>boolean</code>
Return true if gif is animated, false if it is a still
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
**Returns**: <code>boolean</code> - Whether or not gif is animated
| Param | Type | Description |
| --- | --- | --- |
| pathStr | <code>string</code> | Path to gif to check |
<a name="module_lib/filmout..FilmOut+stillInfo"></a>
#### filmOut.stillInfo(pathStr) ⇒ <code>object</code>
Return information on a still image using the Jimp module
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
**Returns**: <code>object</code> - Info about still from sharp
| Param | Type | Description |
| --- | --- | --- |
| pathStr | <code>string</code> | Path to gif to check |
<a name="module_lib/filmout..FilmOut+dirInfo"></a>
#### filmOut.dirInfo(images) ⇒ <code>object</code>
Return information on the first still image found in a
directory using the Jimp module.
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
**Returns**: <code>object</code> - Info about first image
| Param | Type | Description |
| --- | --- | --- |
| images | <code>array</code> | List of image paths |
<a name="module_lib/filmout..FilmOut+dirList"></a>
#### filmOut.dirList(pathStr) ⇒ <code>array</code>
Returns a list of images within a directory, filtered
for supported types and sorted.
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
**Returns**: <code>array</code> - Array of image paths
| Param | Type | Description |
| --- | --- | --- |
| pathStr | <code>string</code> | Path to directory |
<a name="module_lib/filmout..FilmOut+previewFrame"></a>
#### filmOut.previewFrame(evt, arg)
Preview a frame from the selected video.
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
| Param | Type | Description |
| --- | --- | --- |
| evt | <code>object</code> | Original event |
| arg | <code>object</code> | Arguments from message |
<a name="module_lib/filmout..FilmOut+preview"></a>
#### filmOut.preview(evt, arg)
Open a single frame in a display window to preview filmout.
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
| Param | Type | Description |
| --- | --- | --- |
| evt | <code>object</code> | Original event |
| arg | <code>object</code> | Arguments from message |
<a name="module_lib/filmout..FilmOut+focus"></a>
#### filmOut.focus()
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
<a name="module_lib/filmout..FilmOut+field"></a>
#### filmOut.field()
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
<a name="module_lib/filmout..FilmOut+meter"></a>
#### filmOut.meter()
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
<a name="module_lib/filmout..FilmOut+close"></a>
#### filmOut.close()
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)
<a name="module_lib/filmout..FilmOut+onDisplay"></a>
#### filmOut.onDisplay()
**Kind**: instance method of [<code>FilmOut</code>](#module_lib/filmout..FilmOut)

View File

@ -19,9 +19,10 @@ interface FilmOutState {
enabled: boolean;
files: string[];
}
/** @module lib/filmout */
/**
* @module FilmOut
**/
* Class representing all filmout features.
*/
export declare class FilmOut {
private id;
private videoExtensions;

View File

@ -12,9 +12,10 @@ const delay_1 = require("delay");
const crypto_1 = require("crypto");
const frame_1 = require("frame");
const log_1 = require("log");
/** @module lib/filmout */
/**
* @module FilmOut
**/
* Class representing all filmout features.
*/
class FilmOut {
/**
* @constructor

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,9 @@
<a name="module_lib/frame"></a>
## lib/frame
<a name="module_lib/frame..Frame"></a>
### lib/frame~Frame
Class representing the static Frame module.
**Kind**: inner class of [<code>lib/frame</code>](#module_lib/frame)

View File

@ -4,6 +4,10 @@ interface RGBA {
b: number;
a: number;
}
/** @module lib/frame */
/**
* Class representing the static Frame module.
*/
export declare class Frame {
static info(imagePath: string): Promise<{
width: any;

View File

@ -5,6 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.Frame = void 0;
const jimp_1 = __importDefault(require("jimp"));
/** @module lib/frame */
/**
* Class representing the static Frame module.
*/
class Frame {
static async info(imagePath) {
let image;

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/frame/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AAEb,gDAAwB;AASxB,MAAa,KAAK;IACjB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAE,SAAkB;QACpC,IAAI,KAAW,CAAC;QAChB,IAAI;YACH,KAAK,GAAG,MAAM,cAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACnC;QAAC,OAAO,GAAG,EAAE;YACb,MAAM,GAAG,CAAC;SACV;QACD,OAAO;YACN,KAAK,EAAG,KAAK,CAAC,MAAM,CAAC,KAAK;YAC1B,MAAM,EAAG,KAAK,CAAC,MAAM,CAAC,MAAM;SAC5B,CAAC;IACH,CAAC;IACD,MAAM,CAAC,KAAK,CAAC,UAAU,CAAE,KAAc,EAAE,MAAe,EAAE,KAAY;QACrE,YAAY;QACZ,MAAM,QAAQ,GAAY,cAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7E,OAAO,IAAI,OAAO,CAAC,CAAC,OAAkB,EAAE,MAAiB,EAAE,EAAE;YAC5D,OAAO,IAAI,cAAI,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBACrD,IAAI,GAAG,EAAE;oBACR,OAAO,MAAM,CAAC,GAAG,CAAC,CAAA;iBAClB;gBACD,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,KAAK,CAAE,MAAY,EAAE,KAAY,EAAE,SAAkB;QACjE,oKAAoK;QACpK,MA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MAAM,CAAC,KAAK,CAAC;QACzB,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC;QAE3B,IAAI;YACH,MAAM,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;SACtD;QAAC,OAAO,GAAG,EAAE;YACb,MAAM,GAAG,CAAC;SACV;QAED,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;QAErC,IAAI;YACH,MAAM,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;SACnC;QAAC,OAAO,GAAG,EAAE;YACb,MAAM,GAAG,CAAC;SACV;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;CACD;AA/DD,sBA+DC;AAED,MAAM,CAAC,OAAO,GAAG,EAAE,KAAK,EAAE,CAAA"}

View File

@ -0,0 +1,9 @@
<a name="module_lib/intval"></a>
## lib/intval
<a name="module_lib/intval..Intval"></a>
### lib/intval~Intval
Class representing all intval3 camera features.
**Kind**: inner class of [<code>lib/intval</code>](#module_lib/intval)

View File

@ -1,3 +1,7 @@
/** @module lib/intval */
/**
* Class representing all intval3 camera features.
*/
export declare class Intval {
private _baseUrl;
constructor(url: string);

View File

@ -25,6 +25,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.Intval = void 0;
const request = __importStar(require("request"));
/** @module lib/intval */
/**
* Class representing all intval3 camera features.
*/
class Intval {
constructor(url) {
this._baseUrl = `http://${url}`;

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/intval/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AAEZ,iDAAkC;AAElC,MAAa,MAAM;IAGlB,YAAa,GAAY;QACxB,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAA;IAChC,CAAC;IACM,KAA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AAA;QACnB,CAAC,CAAC,CAAA;IACH,CAAC;CACD;AAhED,wBAgEC;AAED,MAAM,CAAC,OAAO,GAAG,EAAE,MAAM,EAAE,CAAA"}

View File

@ -1,32 +1,46 @@
<a name="Light"></a>
<a name="module_lib/light"></a>
## Light
**Kind**: global class
## lib/light
* [Light](#Light)
* [.init()](#Light+init)
* [.listen()](#Light+listen)
* [.listener()](#Light+listener)
* [.set()](#Light+set)
* [.end()](#Light+end)
* [lib/light](#module_lib/light)
* [~Light](#module_lib/light..Light)
* [.init()](#module_lib/light..Light+init)
* [.listen()](#module_lib/light..Light+listen)
* [.listener()](#module_lib/light..Light+listener)
* [.set()](#module_lib/light..Light+set)
* [.end()](#module_lib/light..Light+end)
<a name="Light+init"></a>
<a name="module_lib/light..Light"></a>
### light.init()
**Kind**: instance method of [<code>Light</code>](#Light)
<a name="Light+listen"></a>
### lib/light~Light
Class representing the all light features.
### light.listen()
**Kind**: instance method of [<code>Light</code>](#Light)
<a name="Light+listener"></a>
**Kind**: inner class of [<code>lib/light</code>](#module_lib/light)
### light.listener()
**Kind**: instance method of [<code>Light</code>](#Light)
<a name="Light+set"></a>
* [~Light](#module_lib/light..Light)
* [.init()](#module_lib/light..Light+init)
* [.listen()](#module_lib/light..Light+listen)
* [.listener()](#module_lib/light..Light+listener)
* [.set()](#module_lib/light..Light+set)
* [.end()](#module_lib/light..Light+end)
### light.set()
**Kind**: instance method of [<code>Light</code>](#Light)
<a name="Light+end"></a>
<a name="module_lib/light..Light+init"></a>
### light.end()
**Kind**: instance method of [<code>Light</code>](#Light)
#### light.init()
**Kind**: instance method of [<code>Light</code>](#module_lib/light..Light)
<a name="module_lib/light..Light+listen"></a>
#### light.listen()
**Kind**: instance method of [<code>Light</code>](#module_lib/light..Light)
<a name="module_lib/light..Light+listener"></a>
#### light.listener()
**Kind**: instance method of [<code>Light</code>](#module_lib/light..Light)
<a name="module_lib/light..Light+set"></a>
#### light.set()
**Kind**: instance method of [<code>Light</code>](#module_lib/light..Light)
<a name="module_lib/light..Light+end"></a>
#### light.end()
**Kind**: instance method of [<code>Light</code>](#module_lib/light..Light)

View File

@ -4,6 +4,10 @@ import type { WebContents } from 'electron';
interface LightState {
color: number[];
}
/** @module lib/light */
/**
* Class representing the all light features.
*/
export declare class Light {
state: LightState;
private arduino;

View File

@ -4,6 +4,10 @@ exports.Light = void 0;
const electron_1 = require("electron");
const delay_1 = require("delay");
const log_1 = require("log");
/** @module lib/light */
/**
* Class representing the all light features.
*/
class Light {
/**
*

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/light/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,uCAAmC;AACnC,iCAA8B;AAC9B,6BAA0B;AAU1B,MAAa,KAAK;IAYjB;;QAEI;IACJ,YAAa,OAAiB,EAAE,GAAY,EAAE,EAAgB;QAdvD,UAAK,GAAgB,EAAE,KAAK,EAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAA;QAMzC,QAAG,GAAoB,kBAAO,CAAC;QAC/B,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,MAAM,EAAE,CAAC;IACf,CAAC;IAED;;QAEI;IACI,MAAM;QACb,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,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AAI,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;SACnD;QAAC,OAAO,GAAG,EAAE;YACb,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;YAC1C,MAAM,GAAG,CAAA;SACT;QACD,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AA9FD,sBA8FC;AAED,MAAM,CAAC,OAAO,GAAG,EAAE,KAAK,EAAE,CAAC"}

View File

@ -1,71 +1,100 @@
## Classes
<a name="module_lib/mscript"></a>
<dl>
<dt><a href="#Create new Mscript interpreter">Create new Mscript interpreter</a></dt>
<dd></dd>
<dt><a href="#Mscript">Mscript</a></dt>
<dd><p>class Mscript</p>
</dd>
</dl>
## lib/mscript
<a name="Create new Mscript interpreter"></a>
* [lib/mscript](#module_lib/mscript)
* [~Create new Mscript interpreter](#module_lib/mscript..Create new Mscript interpreter)
* [~Mscript](#module_lib/mscript..Mscript)
* [.clear()](#module_lib/mscript..Mscript+clear)
* [.interpret(text, callback)](#module_lib/mscript..Mscript+interpret) ⇒ <code>object</code>
* [.variable(line)](#module_lib/mscript..Mscript+variable)
* [.variable_replace(line)](#module_lib/mscript..Mscript+variable_replace) ⇒ <code>string</code>
* [.basic_cmd(line, short)](#module_lib/mscript..Mscript+basic_cmd)
* [.new_loop(line, fade)](#module_lib/mscript..Mscript+new_loop)
* [.end_loop(line)](#module_lib/mscript..Mscript+end_loop)
* [.move_cam(line)](#module_lib/mscript..Mscript+move_cam)
* [.move_cam2(line)](#module_lib/mscript..Mscript+move_cam2)
* [.move_proj(line)](#module_lib/mscript..Mscript+move_proj)
* [.move_proj2(line)](#module_lib/mscript..Mscript+move_proj2)
* [.set_state(line)](#module_lib/mscript..Mscript+set_state)
* [.last_loop()](#module_lib/mscript..Mscript+last_loop) ⇒ <code>object</code>
* [.parent_loop()](#module_lib/mscript..Mscript+parent_loop) ⇒ <code>object</code>
* [.loop_count()](#module_lib/mscript..Mscript+loop_count) ⇒ <code>integer</code>
* [.fade(line)](#module_lib/mscript..Mscript+fade)
* [.fade_count(str)](#module_lib/mscript..Mscript+fade_count)
* [.fade_start(str)](#module_lib/mscript..Mscript+fade_start) ⇒ <code>array</code>
* [.fade_end(str)](#module_lib/mscript..Mscript+fade_end) ⇒ <code>array</code>
* [.fade_rgb(start, end, len, x)](#module_lib/mscript..Mscript+fade_rgb) ⇒ <code>array</code>
* [.rgb(str)](#module_lib/mscript..Mscript+rgb)
* [.rgb_str(arr)](#module_lib/mscript..Mscript+rgb_str) ⇒ <code>string</code>
* [.update(cmd)](#module_lib/mscript..Mscript+update)
* [.str_to_arr(str, cmd)](#module_lib/mscript..Mscript+str_to_arr) ⇒ <code>array</code>
* [.light_to_arr(str, cmd)](#module_lib/mscript..Mscript+light_to_arr) ⇒ <code>array</code>
* [.light_state(Color)](#module_lib/mscript..Mscript+light_state)
* [.delay(line)](#module_lib/mscript..Mscript+delay)
* [.alert(line)](#module_lib/mscript..Mscript+alert)
* [.pause(line)](#module_lib/mscript..Mscript+pause)
* [.fail(msg)](#module_lib/mscript..Mscript+fail)
* [.contains(arr, arr2)](#module_lib/mscript..Mscript+contains) ⇒ <code>boolean</code>
## Create new Mscript interpreter
**Kind**: global class
<a name="Mscript"></a>
<a name="module_lib/mscript..Create new Mscript interpreter"></a>
## Mscript
class Mscript
### lib/mscript~Create new Mscript interpreter
**Kind**: inner class of [<code>lib/mscript</code>](#module_lib/mscript)
<a name="module_lib/mscript..Mscript"></a>
**Kind**: global class
### lib/mscript~Mscript
Class representing the mscript language.
* [Mscript](#Mscript)
* [.clear()](#Mscript+clear)
* [.interpret(text, callback)](#Mscript+interpret) ⇒ <code>object</code>
* [.variable(line)](#Mscript+variable)
* [.variable_replace(line)](#Mscript+variable_replace) ⇒ <code>string</code>
* [.basic_cmd(line, short)](#Mscript+basic_cmd)
* [.new_loop(line, fade)](#Mscript+new_loop)
* [.end_loop(line)](#Mscript+end_loop)
* [.move_cam(line)](#Mscript+move_cam)
* [.move_cam2(line)](#Mscript+move_cam2)
* [.move_proj(line)](#Mscript+move_proj)
* [.move_proj2(line)](#Mscript+move_proj2)
* [.set_state(line)](#Mscript+set_state)
* [.last_loop()](#Mscript+last_loop) ⇒ <code>object</code>
* [.parent_loop()](#Mscript+parent_loop) ⇒ <code>object</code>
* [.loop_count()](#Mscript+loop_count) ⇒ <code>integer</code>
* [.fade(line)](#Mscript+fade)
* [.fade_count(str)](#Mscript+fade_count)
* [.fade_start(str)](#Mscript+fade_start) ⇒ <code>array</code>
* [.fade_end(str)](#Mscript+fade_end) ⇒ <code>array</code>
* [.fade_rgb(start, end, len, x)](#Mscript+fade_rgb) ⇒ <code>array</code>
* [.rgb(str)](#Mscript+rgb)
* [.rgb_str(arr)](#Mscript+rgb_str) ⇒ <code>string</code>
* [.update(cmd)](#Mscript+update)
* [.str_to_arr(str, cmd)](#Mscript+str_to_arr) ⇒ <code>array</code>
* [.light_to_arr(str, cmd)](#Mscript+light_to_arr) ⇒ <code>array</code>
* [.light_state(Color)](#Mscript+light_state)
* [.delay(line)](#Mscript+delay)
* [.alert(line)](#Mscript+alert)
* [.pause(line)](#Mscript+pause)
* [.fail(msg)](#Mscript+fail)
* [.contains(arr, arr2)](#Mscript+contains) ⇒ <code>boolean</code>
**Kind**: inner class of [<code>lib/mscript</code>](#module_lib/mscript)
<a name="Mscript+clear"></a>
* [~Mscript](#module_lib/mscript..Mscript)
* [.clear()](#module_lib/mscript..Mscript+clear)
* [.interpret(text, callback)](#module_lib/mscript..Mscript+interpret) ⇒ <code>object</code>
* [.variable(line)](#module_lib/mscript..Mscript+variable)
* [.variable_replace(line)](#module_lib/mscript..Mscript+variable_replace) ⇒ <code>string</code>
* [.basic_cmd(line, short)](#module_lib/mscript..Mscript+basic_cmd)
* [.new_loop(line, fade)](#module_lib/mscript..Mscript+new_loop)
* [.end_loop(line)](#module_lib/mscript..Mscript+end_loop)
* [.move_cam(line)](#module_lib/mscript..Mscript+move_cam)
* [.move_cam2(line)](#module_lib/mscript..Mscript+move_cam2)
* [.move_proj(line)](#module_lib/mscript..Mscript+move_proj)
* [.move_proj2(line)](#module_lib/mscript..Mscript+move_proj2)
* [.set_state(line)](#module_lib/mscript..Mscript+set_state)
* [.last_loop()](#module_lib/mscript..Mscript+last_loop) ⇒ <code>object</code>
* [.parent_loop()](#module_lib/mscript..Mscript+parent_loop) ⇒ <code>object</code>
* [.loop_count()](#module_lib/mscript..Mscript+loop_count) ⇒ <code>integer</code>
* [.fade(line)](#module_lib/mscript..Mscript+fade)
* [.fade_count(str)](#module_lib/mscript..Mscript+fade_count)
* [.fade_start(str)](#module_lib/mscript..Mscript+fade_start) ⇒ <code>array</code>
* [.fade_end(str)](#module_lib/mscript..Mscript+fade_end) ⇒ <code>array</code>
* [.fade_rgb(start, end, len, x)](#module_lib/mscript..Mscript+fade_rgb) ⇒ <code>array</code>
* [.rgb(str)](#module_lib/mscript..Mscript+rgb)
* [.rgb_str(arr)](#module_lib/mscript..Mscript+rgb_str) ⇒ <code>string</code>
* [.update(cmd)](#module_lib/mscript..Mscript+update)
* [.str_to_arr(str, cmd)](#module_lib/mscript..Mscript+str_to_arr) ⇒ <code>array</code>
* [.light_to_arr(str, cmd)](#module_lib/mscript..Mscript+light_to_arr) ⇒ <code>array</code>
* [.light_state(Color)](#module_lib/mscript..Mscript+light_state)
* [.delay(line)](#module_lib/mscript..Mscript+delay)
* [.alert(line)](#module_lib/mscript..Mscript+alert)
* [.pause(line)](#module_lib/mscript..Mscript+pause)
* [.fail(msg)](#module_lib/mscript..Mscript+fail)
* [.contains(arr, arr2)](#module_lib/mscript..Mscript+contains) ⇒ <code>boolean</code>
### mscript.clear()
<a name="module_lib/mscript..Mscript+clear"></a>
#### mscript.clear()
Clear the state of the script
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
<a name="Mscript+interpret"></a>
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
<a name="module_lib/mscript..Mscript+interpret"></a>
### mscript.interpret(text, callback) ⇒ <code>object</code>
#### mscript.interpret(text, callback) ⇒ <code>object</code>
Main function, accepts multi-line string, parses into lines
and interprets the instructions from the text. Returns an array
of steps to be fed into the mcopy sequence.
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
**Returns**: <code>object</code> - if callback is not provided
| Param | Type | Description |
@ -73,193 +102,193 @@ of steps to be fed into the mcopy sequence.
| text | <code>string</code> | Mscript text to interpret |
| callback | <code>function</code> | Function to call when string is interpreted |
<a name="Mscript+variable"></a>
<a name="module_lib/mscript..Mscript+variable"></a>
### mscript.variable(line)
#### mscript.variable(line)
Interprets variables for complex sequence behavior.
TODO: Fully implement, add test coverage
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | Line containing a variable assignment |
<a name="Mscript+variable_replace"></a>
<a name="module_lib/mscript..Mscript+variable_replace"></a>
### mscript.variable\_replace(line) ⇒ <code>string</code>
#### mscript.variable\_replace(line) ⇒ <code>string</code>
Replace variable with value at time of interpretation
TODO: Implement this please
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
**Returns**: <code>string</code> - New string to be interpreted
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | Line containing variable to be replaced with value |
<a name="Mscript+basic_cmd"></a>
<a name="module_lib/mscript..Mscript+basic_cmd"></a>
### mscript.basic\_cmd(line, short)
#### mscript.basic\_cmd(line, short)
Interpret a basic two character command
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | Line of script to interpret |
| short | <code>string</code> | The short command to use |
<a name="Mscript+new_loop"></a>
<a name="module_lib/mscript..Mscript+new_loop"></a>
### mscript.new\_loop(line, fade)
#### mscript.new\_loop(line, fade)
Start a new loop
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | Line to evaluate as either loop or fade |
| fade | <code>boolean</code> | Flag as true if fade |
<a name="Mscript+end_loop"></a>
<a name="module_lib/mscript..Mscript+end_loop"></a>
### mscript.end\_loop(line)
#### mscript.end\_loop(line)
Close the most recent loop
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | Line to interpret |
<a name="Mscript+move_cam"></a>
<a name="module_lib/mscript..Mscript+move_cam"></a>
### mscript.move\_cam(line)
#### mscript.move\_cam(line)
Move camera to explicitly-defined frame
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | Line to interpret with camera move statement |
<a name="Mscript+move_cam2"></a>
<a name="module_lib/mscript..Mscript+move_cam2"></a>
### mscript.move\_cam2(line)
#### mscript.move\_cam2(line)
Move secondary camera to explicitly-defined frame
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | Line to interpret with camera move statement |
<a name="Mscript+move_proj"></a>
<a name="module_lib/mscript..Mscript+move_proj"></a>
### mscript.move\_proj(line)
#### mscript.move\_proj(line)
Move projector to explicitly-defined frame
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | Line containing `move` statement to interpret |
<a name="Mscript+move_proj2"></a>
<a name="module_lib/mscript..Mscript+move_proj2"></a>
### mscript.move\_proj2(line)
#### mscript.move\_proj2(line)
Move projector to explicitly-defined frame
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | Line containing `move` statement to interpret |
<a name="Mscript+set_state"></a>
<a name="module_lib/mscript..Mscript+set_state"></a>
### mscript.set\_state(line)
#### mscript.set\_state(line)
Set the state of either the cam or projector
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | String containing set statement |
<a name="Mscript+last_loop"></a>
<a name="module_lib/mscript..Mscript+last_loop"></a>
### mscript.last\_loop() ⇒ <code>object</code>
#### mscript.last\_loop() ⇒ <code>object</code>
Return the last loop
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
<a name="Mscript+parent_loop"></a>
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
<a name="module_lib/mscript..Mscript+parent_loop"></a>
### mscript.parent\_loop() ⇒ <code>object</code>
#### mscript.parent\_loop() ⇒ <code>object</code>
Return the second-last loop
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
**Returns**: <code>object</code> - Loop array
<a name="Mscript+loop_count"></a>
<a name="module_lib/mscript..Mscript+loop_count"></a>
### mscript.loop\_count() ⇒ <code>integer</code>
#### mscript.loop\_count() ⇒ <code>integer</code>
Extract the loop count integer from a LOOP cmd
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
**Returns**: <code>integer</code> - Loop count in string parsed into integer
<a name="Mscript+fade"></a>
<a name="module_lib/mscript..Mscript+fade"></a>
### mscript.fade(line)
#### mscript.fade(line)
Execute a fade of frame length, from color to another color
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | Line containing a fade initiator |
<a name="Mscript+fade_count"></a>
<a name="module_lib/mscript..Mscript+fade_count"></a>
### mscript.fade\_count(str)
#### mscript.fade\_count(str)
Extract the fade length integer from a FADE cmd
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| str | <code>string</code> | Line containing the length of fade in frames |
<a name="Mscript+fade_start"></a>
<a name="module_lib/mscript..Mscript+fade_start"></a>
### mscript.fade\_start(str) ⇒ <code>array</code>
#### mscript.fade\_start(str) ⇒ <code>array</code>
Extract the start color from a string
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
**Returns**: <code>array</code> - Array containing RGB color values
| Param | Type | Description |
| --- | --- | --- |
| str | <code>string</code> | Line containing the start color value in a fade initiator |
<a name="Mscript+fade_end"></a>
<a name="module_lib/mscript..Mscript+fade_end"></a>
### mscript.fade\_end(str) ⇒ <code>array</code>
#### mscript.fade\_end(str) ⇒ <code>array</code>
Extract the end color from a string
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
**Returns**: <code>array</code> - Array containing RGB color values
| Param | Type | Description |
| --- | --- | --- |
| str | <code>string</code> | Line containing the end color value in a fade initiator |
<a name="Mscript+fade_rgb"></a>
<a name="module_lib/mscript..Mscript+fade_rgb"></a>
### mscript.fade\_rgb(start, end, len, x) ⇒ <code>array</code>
#### mscript.fade\_rgb(start, end, len, x) ⇒ <code>array</code>
Determine the state of a fade at a particular frame in the sequence, x
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
**Returns**: <code>array</code> - Array containing RGB color values
| Param | Type | Description |
@ -269,48 +298,48 @@ Determine the state of a fade at a particular frame in the sequence, x
| len | <code>integer</code> | Total length of the fade in frames |
| x | <code>integer</code> | Position of the fade to get color value of |
<a name="Mscript+rgb"></a>
<a name="module_lib/mscript..Mscript+rgb"></a>
### mscript.rgb(str)
#### mscript.rgb(str)
Parse string into array of RGB color values. 0-255 octet.
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| str | <code>string</code> | String containing only color values as `#,#,#` |
<a name="Mscript+rgb_str"></a>
<a name="module_lib/mscript..Mscript+rgb_str"></a>
### mscript.rgb\_str(arr) ⇒ <code>string</code>
#### mscript.rgb\_str(arr) ⇒ <code>string</code>
Cast RGB color values as string
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
**Returns**: <code>string</code> - String of RGB values
| Param | Type | Description |
| --- | --- | --- |
| arr | <code>array</code> | Array to join into string |
<a name="Mscript+update"></a>
<a name="module_lib/mscript..Mscript+update"></a>
### mscript.update(cmd)
#### mscript.update(cmd)
Increase the state of a specific object, such as the camera/projector,
by the value defined in val.
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| cmd | <code>string</code> | String representing command to interpret and update state |
<a name="Mscript+str_to_arr"></a>
<a name="module_lib/mscript..Mscript+str_to_arr"></a>
### mscript.str\_to\_arr(str, cmd) ⇒ <code>array</code>
#### mscript.str\_to\_arr(str, cmd) ⇒ <code>array</code>
Split string on command, turn into array of commands
as long as count variable. Default 1.
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
**Returns**: <code>array</code> - Array containing commands
| Param | Type | Description |
@ -318,12 +347,12 @@ as long as count variable. Default 1.
| str | <code>string</code> | String to split |
| cmd | <code>string</code> | String representing command to split at |
<a name="Mscript+light_to_arr"></a>
<a name="module_lib/mscript..Mscript+light_to_arr"></a>
### mscript.light\_to\_arr(str, cmd) ⇒ <code>array</code>
#### mscript.light\_to\_arr(str, cmd) ⇒ <code>array</code>
Split a string on a command to extract data for light array
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
**Returns**: <code>array</code> - An RGB array containing the color values
| Param | Type | Description |
@ -331,68 +360,68 @@ Split a string on a command to extract data for light array
| str | <code>string</code> | String containing light command |
| cmd | <code>string</code> | String representing command |
<a name="Mscript+light_state"></a>
<a name="module_lib/mscript..Mscript+light_state"></a>
### mscript.light\_state(Color)
#### mscript.light\_state(Color)
Split a string to extract an rgb color value
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| Color | <code>string</code> | string assign to color property |
<a name="Mscript+delay"></a>
<a name="module_lib/mscript..Mscript+delay"></a>
### mscript.delay(line)
#### mscript.delay(line)
Interpret a delay command
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | String containing delay command |
<a name="Mscript+alert"></a>
<a name="module_lib/mscript..Mscript+alert"></a>
### mscript.alert(line)
#### mscript.alert(line)
Interpret an alert command
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | String containing alert message |
<a name="Mscript+pause"></a>
<a name="module_lib/mscript..Mscript+pause"></a>
### mscript.pause(line)
#### mscript.pause(line)
Interpret an pause command
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| line | <code>string</code> | String containing alert message |
<a name="Mscript+fail"></a>
<a name="module_lib/mscript..Mscript+fail"></a>
### mscript.fail(msg)
#### mscript.fail(msg)
Throw an error with specific message
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
| Param | Type | Description |
| --- | --- | --- |
| msg | <code>string</code> | Error message to print |
<a name="Mscript+contains"></a>
<a name="module_lib/mscript..Mscript+contains"></a>
### mscript.contains(arr, arr2) ⇒ <code>boolean</code>
#### mscript.contains(arr, arr2) ⇒ <code>boolean</code>
Determine if array contains matching elements of
another array
**Kind**: instance method of [<code>Mscript</code>](#Mscript)
**Kind**: instance method of [<code>Mscript</code>](#module_lib/mscript..Mscript)
**Returns**: <code>boolean</code> - Whether arr contains elements in arr2
| Param | Type | Description |

View File

@ -1,26 +1,37 @@
/** @module lib/mscript */
interface MscriptOutput {
success: boolean;
arr: string[];
meta: string[];
cam: number;
proj: number;
cam2?: number;
proj2?: number;
}
interface RGB extends Array<number> {
[index: number]: number;
}
/** class Mscript */
/** @module lib/mscript */
/**
* Class representing the mscript language.
*/
export default class Mscript {
output: any;
lines: string[];
cam: number;
cam2: number;
proj: number;
proj2: number;
color: string;
loops: any[];
rec: number;
two: string;
three: string;
four: string;
arr: any[];
meta: string[];
target: number;
dist: number;
variables: any;
private output;
private lines;
private cam;
private cam2;
private proj;
private proj2;
private color;
private loops;
private rec;
private two;
private three;
private four;
private arr;
private meta;
private target;
private dist;
private variables;
/**
* @constructor
* Create new Mscript interpreter
@ -40,7 +51,7 @@ export default class Mscript {
*
* @returns {object} if callback is not provided
*/
interpret(text: string): any;
interpret(text: string): void | MscriptOutput;
/**
* Interprets variables for complex sequence behavior.
* TODO: Fully implement, add test coverage

View File

@ -63,14 +63,23 @@ const ALTS = {
const DELAY = 'DELAY';
const PAUSE = 'PAUSE';
const ALERT = 'ALERT';
/** class Mscript */
/** @module lib/mscript */
/**
* Class representing the mscript language.
*/
class Mscript {
/**
* @constructor
* Create new Mscript interpreter
**/
constructor() {
this.output = {};
this.output = {
success: false,
arr: [],
meta: [],
cam: 0,
proj: 0
};
}
/**
* Clear the state of the script
@ -92,7 +101,13 @@ class Mscript {
this.target = 0; //move to target using CAM # or PROJ #
this.dist = 0;
this.variables = {};
this.output = {};
this.output = {
success: false,
arr: [],
meta: [],
cam: 0,
proj: 0
};
}
/**
* Main function, accepts multi-line string, parses into lines
@ -199,6 +214,7 @@ class Mscript {
let key = parts[0];
let value = parts[1];
let update = false;
let num;
if (value && value.indexOf('#') !== -1) {
value = value.split('#')[0];
}
@ -214,7 +230,7 @@ class Mscript {
}
if (line.indexOf(',') === -1) { //if not color string
try {
value = parseInt(value);
num = parseInt(value);
}
catch (err) {
//supress parsing error
@ -222,7 +238,7 @@ class Mscript {
}
//console.dir(parts)
if (!this.variables[key] || update) {
this.variables[key] = value;
this.variables[key] = num;
}
//console.dir(this.variables)
}
@ -638,10 +654,14 @@ class Mscript {
if (this.rec === 0) {
this.cam += this.loops[this.rec].cam;
this.proj += this.loops[this.rec].proj;
this.cam2 += this.loops[this.rec].cam2;
this.proj2 += this.loops[this.rec].proj2;
}
else if (this.rec >= 1) {
this.loops[this.rec - 1].cam += this.loops[this.rec].cam;
this.loops[this.rec - 1].proj += this.loops[this.rec].proj;
this.loops[this.rec - 1].cam2 += this.loops[this.rec].cam2;
this.loops[this.rec - 1].proj2 += this.loops[this.rec].proj2;
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,9 @@
<a name="module_lib/processing"></a>
## lib/processing
<a name="module_lib/processing..Processing"></a>
### lib/processing~Processing
Class representing all Processing camera features.
**Kind**: inner class of [<code>lib/processing</code>](#module_lib/processing)

View File

@ -1,3 +1,7 @@
/** @module lib/processing */
/**
* Class representing all Processing camera features.
*/
export declare class Processing {
private _baseUrl;
constructor(url: string);

View File

@ -2,6 +2,10 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.Processing = void 0;
const exec_1 = require("exec");
/** @module lib/processing */
/**
* Class representing all Processing camera features.
*/
class Processing {
constructor(url) {
this._baseUrl = (url.indexOf('http') === -1 && url.indexOf('://') === -1) ? `http://${url}` : url;

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/processing/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;AAEZ,+BAA4B;AAG5B,MAAa,UAAU;IAEtB,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,OAAkB,EAAE,MAAiB,EAAE,EAAE;YACnE,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,GAAgB,CAAA;YACpB,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,C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CAAA;QACnB,CAAC,CAAC,CAAA;IACH,CAAC;IACM,KAAK,CAAC,MAAM,CAAE,GAAa;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"}

View File

@ -1,37 +1,52 @@
<a name="Projector"></a>
<a name="module_lib/proj"></a>
## Projector
**Kind**: global class
## lib/proj
* [Projector](#Projector)
* [.init()](#Projector+init)
* [.listen()](#Projector+listen)
* [.set()](#Projector+set)
* [.move()](#Projector+move)
* [.listener()](#Projector+listener)
* [.end()](#Projector+end)
* [lib/proj](#module_lib/proj)
* [~Projector](#module_lib/proj..Projector)
* [.init()](#module_lib/proj..Projector+init)
* [.listen()](#module_lib/proj..Projector+listen)
* [.set()](#module_lib/proj..Projector+set)
* [.move()](#module_lib/proj..Projector+move)
* [.listener()](#module_lib/proj..Projector+listener)
* [.end()](#module_lib/proj..Projector+end)
<a name="Projector+init"></a>
<a name="module_lib/proj..Projector"></a>
### projector.init()
**Kind**: instance method of [<code>Projector</code>](#Projector)
<a name="Projector+listen"></a>
### lib/proj~Projector
Class representing all projector features.
### projector.listen()
**Kind**: instance method of [<code>Projector</code>](#Projector)
<a name="Projector+set"></a>
**Kind**: inner class of [<code>lib/proj</code>](#module_lib/proj)
### projector.set()
**Kind**: instance method of [<code>Projector</code>](#Projector)
<a name="Projector+move"></a>
* [~Projector](#module_lib/proj..Projector)
* [.init()](#module_lib/proj..Projector+init)
* [.listen()](#module_lib/proj..Projector+listen)
* [.set()](#module_lib/proj..Projector+set)
* [.move()](#module_lib/proj..Projector+move)
* [.listener()](#module_lib/proj..Projector+listener)
* [.end()](#module_lib/proj..Projector+end)
### projector.move()
**Kind**: instance method of [<code>Projector</code>](#Projector)
<a name="Projector+listener"></a>
<a name="module_lib/proj..Projector+init"></a>
### projector.listener()
**Kind**: instance method of [<code>Projector</code>](#Projector)
<a name="Projector+end"></a>
#### projector.init()
**Kind**: instance method of [<code>Projector</code>](#module_lib/proj..Projector)
<a name="module_lib/proj..Projector+listen"></a>
### projector.end()
**Kind**: instance method of [<code>Projector</code>](#Projector)
#### projector.listen()
**Kind**: instance method of [<code>Projector</code>](#module_lib/proj..Projector)
<a name="module_lib/proj..Projector+set"></a>
#### projector.set()
**Kind**: instance method of [<code>Projector</code>](#module_lib/proj..Projector)
<a name="module_lib/proj..Projector+move"></a>
#### projector.move()
**Kind**: instance method of [<code>Projector</code>](#module_lib/proj..Projector)
<a name="module_lib/proj..Projector+listener"></a>
#### projector.listener()
**Kind**: instance method of [<code>Projector</code>](#module_lib/proj..Projector)
<a name="module_lib/proj..Projector+end"></a>
#### projector.end()
**Kind**: instance method of [<code>Projector</code>](#module_lib/proj..Projector)

View File

@ -7,6 +7,10 @@ interface ProjectorState {
pos: number;
dir: boolean;
}
/** @module lib/proj */
/**
* Class representing all projector features.
*/
export declare class Projector {
state: ProjectorState;
arduino: Arduino;

View File

@ -4,6 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.Projector = void 0;
const electron_1 = require("electron");
const log_1 = require("log");
/** @module lib/proj */
/**
* Class representing all projector features.
*/
class Projector {
/**
*

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,19 @@
* [lib/sequencer](#module_lib/sequencer)
* [~Create a new sequencer and assign command and UI as private sub-classes](#module_lib/sequencer..Create a new sequencer and assign command and UI as private sub-classes)
* [new Create a new sequencer and assign command and UI as private sub-classes(cfg, cmd, ui)](#new_module_lib/sequencer..Create a new sequencer and assign command and UI as private sub-classes_new)
* [~Sequencer](#module_lib/sequencer..Sequencer)
* [.cmds(obj)](#module_lib/sequencer..Sequencer+cmds)
* [.init()](#module_lib/sequencer..Sequencer+init)
* [.listen()](#module_lib/sequencer..Sequencer+listen)
* [.listener(event, arg)](#module_lib/sequencer..Sequencer+listener)
* [.setLoops(count)](#module_lib/sequencer..Sequencer+setLoops)
* [.setSteps(steps)](#module_lib/sequencer..Sequencer+setSteps)
* [.unsetSteps(steps)](#module_lib/sequencer..Sequencer+unsetSteps)
* [.start(arg)](#module_lib/sequencer..Sequencer+start)
* [.pause()](#module_lib/sequencer..Sequencer+pause)
* [.stop()](#module_lib/sequencer..Sequencer+stop)
* [.step(x)](#module_lib/sequencer..Sequencer+step)
* [.cmdExec(x)](#module_lib/sequencer..Sequencer+cmdExec)
<a name="module_lib/sequencer..Create a new sequencer and assign command and UI as private sub-classes"></a>
@ -20,3 +33,144 @@
| cmd | <code>object</code> | Shared command class |
| ui | <code>object</code> | Electron UI, browser window |
<a name="module_lib/sequencer..Sequencer"></a>
### lib/sequencer~Sequencer
Class representing all sequencer features.
**Kind**: inner class of [<code>lib/sequencer</code>](#module_lib/sequencer)
* [~Sequencer](#module_lib/sequencer..Sequencer)
* [.cmds(obj)](#module_lib/sequencer..Sequencer+cmds)
* [.init()](#module_lib/sequencer..Sequencer+init)
* [.listen()](#module_lib/sequencer..Sequencer+listen)
* [.listener(event, arg)](#module_lib/sequencer..Sequencer+listener)
* [.setLoops(count)](#module_lib/sequencer..Sequencer+setLoops)
* [.setSteps(steps)](#module_lib/sequencer..Sequencer+setSteps)
* [.unsetSteps(steps)](#module_lib/sequencer..Sequencer+unsetSteps)
* [.start(arg)](#module_lib/sequencer..Sequencer+start)
* [.pause()](#module_lib/sequencer..Sequencer+pause)
* [.stop()](#module_lib/sequencer..Sequencer+stop)
* [.step(x)](#module_lib/sequencer..Sequencer+step)
* [.cmdExec(x)](#module_lib/sequencer..Sequencer+cmdExec)
<a name="module_lib/sequencer..Sequencer+cmds"></a>
#### sequencer.cmds(obj)
Take configuration object and assign all commands as keys
in the internal CMDS object.
**Kind**: instance method of [<code>Sequencer</code>](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| obj | <code>object</code> | Configuration object |
<a name="module_lib/sequencer..Sequencer+init"></a>
#### sequencer.init()
Initialize the class by requiring ipcMain from electron
and creating logger.
**Kind**: instance method of [<code>Sequencer</code>](#module_lib/sequencer..Sequencer)
<a name="module_lib/sequencer..Sequencer+listen"></a>
#### sequencer.listen()
Bind ipc listener to channel 'sequencer' or current id of
class.
**Kind**: instance method of [<code>Sequencer</code>](#module_lib/sequencer..Sequencer)
<a name="module_lib/sequencer..Sequencer+listener"></a>
#### sequencer.listener(event, arg)
Listener callback function. Called whenever ipc
message is sent to channel 'sequencer'.
**Kind**: instance method of [<code>Sequencer</code>](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| event | <code>object</code> | IPC message event |
| arg | <code>object</code> | Arguments provided in message |
<a name="module_lib/sequencer..Sequencer+setLoops"></a>
#### sequencer.setLoops(count)
Sets the value of the loops in the grid sequence
to value sent by UI in ipc message.
**Kind**: instance method of [<code>Sequencer</code>](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| count | <code>integer</code> | Number of loops to set grid sequence to |
<a name="module_lib/sequencer..Sequencer+setSteps"></a>
#### sequencer.setSteps(steps)
Sets multiple steps at once
**Kind**: instance method of [<code>Sequencer</code>](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| steps | <code>array</code> | Array of steps to set or update |
<a name="module_lib/sequencer..Sequencer+unsetSteps"></a>
#### sequencer.unsetSteps(steps)
Resets multiple steps to default 'undefined' state
**Kind**: instance method of [<code>Sequencer</code>](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| steps | <code>array</code> | Array containing the x location of steps to unset |
<a name="module_lib/sequencer..Sequencer+start"></a>
#### sequencer.start(arg)
Starts a sequence with the existing grid sequence,
or if one is provided in the arg object, starts
that sequence.
**Kind**: instance method of [<code>Sequencer</code>](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| arg | <code>object</code> | Arguments from ipc message |
<a name="module_lib/sequencer..Sequencer+pause"></a>
#### sequencer.pause()
Pauses sequence from UI.
**Kind**: instance method of [<code>Sequencer</code>](#module_lib/sequencer..Sequencer)
<a name="module_lib/sequencer..Sequencer+stop"></a>
#### sequencer.stop()
Stops the sequence
**Kind**: instance method of [<code>Sequencer</code>](#module_lib/sequencer..Sequencer)
<a name="module_lib/sequencer..Sequencer+step"></a>
#### sequencer.step(x)
Execute command @ step x. Wrapper with try catch.
**Kind**: instance method of [<code>Sequencer</code>](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| x | <code>integer</code> | Step to execute command at |
<a name="module_lib/sequencer..Sequencer+cmdExec"></a>
#### sequencer.cmdExec(x)
Locate step @ position x and execute the command.
**Kind**: instance method of [<code>Sequencer</code>](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| x | <code>integer</code> | Step to execute command at |

View File

@ -1,6 +1,10 @@
import { Commands } from 'cmd';
import type { Config } from 'cfg';
import type { WebContents } from 'electron';
/** @module lib/sequencer */
/**
* Class representing all sequencer features.
*/
export declare class Sequencer {
private running;
private paused;

View File

@ -4,8 +4,11 @@ exports.Sequencer = void 0;
const electron_1 = require("electron");
const log_1 = require("log");
const delay_1 = require("delay");
/** @module lib/sequencer **/
let seq;
/** @module lib/sequencer */
/**
* Class representing all sequencer features.
*/
class Sequencer {
/**
* @constructor

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,20 @@
<a name="module_lib/server"></a>
## lib/server
* [lib/server](#module_lib/server)
* [~Server](#module_lib/server..Server)
* [.cmd()](#module_lib/server..Server+cmd)
<a name="module_lib/server..Server"></a>
### lib/server~Server
Class representing all filmout server features.
**Kind**: inner class of [<code>lib/server</code>](#module_lib/server)
<a name="module_lib/server..Server+cmd"></a>
#### server.cmd()
WSS
**Kind**: instance method of [<code>Server</code>](#module_lib/server..Server)

View File

@ -20,6 +20,10 @@ interface ServerProxyList {
interface ServerQueue {
[key: string]: Function;
}
/** @module lib/server */
/**
* Class representing all filmout server features.
*/
export declare class Server {
private id;
isActive: boolean;

View File

@ -10,6 +10,10 @@ const promises_1 = require("fs/promises");
const path_1 = require("path");
const uuid_1 = require("uuid");
const log_1 = require("log");
/** @module lib/server */
/**
* Class representing all filmout server features.
*/
class Server {
constructor(ui) {
this.id = 'server';

File diff suppressed because one or more lines are too long

View File

@ -1,42 +1,58 @@
<a name="Settings"></a>
<a name="module_lib/settings"></a>
## Settings
**Kind**: global class
## lib/settings
* [Settings](#Settings)
* [.checkDir()](#Settings+checkDir)
* [.save()](#Settings+save)
* [.update()](#Settings+update)
* [.get()](#Settings+get)
* [.all()](#Settings+all)
* [.restore()](#Settings+restore)
* [.reset()](#Settings+reset)
* [lib/settings](#module_lib/settings)
* [~Settings](#module_lib/settings..Settings)
* [.checkDir()](#module_lib/settings..Settings+checkDir)
* [.save()](#module_lib/settings..Settings+save)
* [.update()](#module_lib/settings..Settings+update)
* [.get()](#module_lib/settings..Settings+get)
* [.all()](#module_lib/settings..Settings+all)
* [.restore()](#module_lib/settings..Settings+restore)
* [.reset()](#module_lib/settings..Settings+reset)
<a name="Settings+checkDir"></a>
<a name="module_lib/settings..Settings"></a>
### settings.checkDir()
**Kind**: instance method of [<code>Settings</code>](#Settings)
<a name="Settings+save"></a>
### lib/settings~Settings
Class representing all settings features.
### settings.save()
**Kind**: instance method of [<code>Settings</code>](#Settings)
<a name="Settings+update"></a>
**Kind**: inner class of [<code>lib/settings</code>](#module_lib/settings)
### settings.update()
**Kind**: instance method of [<code>Settings</code>](#Settings)
<a name="Settings+get"></a>
* [~Settings](#module_lib/settings..Settings)
* [.checkDir()](#module_lib/settings..Settings+checkDir)
* [.save()](#module_lib/settings..Settings+save)
* [.update()](#module_lib/settings..Settings+update)
* [.get()](#module_lib/settings..Settings+get)
* [.all()](#module_lib/settings..Settings+all)
* [.restore()](#module_lib/settings..Settings+restore)
* [.reset()](#module_lib/settings..Settings+reset)
### settings.get()
**Kind**: instance method of [<code>Settings</code>](#Settings)
<a name="Settings+all"></a>
<a name="module_lib/settings..Settings+checkDir"></a>
### settings.all()
**Kind**: instance method of [<code>Settings</code>](#Settings)
<a name="Settings+restore"></a>
#### settings.checkDir()
**Kind**: instance method of [<code>Settings</code>](#module_lib/settings..Settings)
<a name="module_lib/settings..Settings+save"></a>
### settings.restore()
**Kind**: instance method of [<code>Settings</code>](#Settings)
<a name="Settings+reset"></a>
#### settings.save()
**Kind**: instance method of [<code>Settings</code>](#module_lib/settings..Settings)
<a name="module_lib/settings..Settings+update"></a>
### settings.reset()
**Kind**: instance method of [<code>Settings</code>](#Settings)
#### settings.update()
**Kind**: instance method of [<code>Settings</code>](#module_lib/settings..Settings)
<a name="module_lib/settings..Settings+get"></a>
#### settings.get()
**Kind**: instance method of [<code>Settings</code>](#module_lib/settings..Settings)
<a name="module_lib/settings..Settings+all"></a>
#### settings.all()
**Kind**: instance method of [<code>Settings</code>](#module_lib/settings..Settings)
<a name="module_lib/settings..Settings+restore"></a>
#### settings.restore()
**Kind**: instance method of [<code>Settings</code>](#module_lib/settings..Settings)
<a name="module_lib/settings..Settings+reset"></a>
#### settings.reset()
**Kind**: instance method of [<code>Settings</code>](#module_lib/settings..Settings)

View File

@ -1,3 +1,7 @@
/** @module lib/settings */
/**
* Class representing all settings features.
*/
export declare class Settings {
private file;
private defaultState;

View File

@ -4,6 +4,10 @@ exports.Settings = void 0;
const os_1 = require("os");
const path_1 = require("path");
const promises_1 = require("fs/promises");
/** @module lib/settings */
/**
* Class representing all settings features.
*/
class Settings {
/**
*

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/settings/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;AAEZ,2BAA6B;AAC7B,+BAA4B;AAC5B,0CAAyE;AAGzE,MAAa,QAAQ;IAgBpB;;QAEI;IACJ;QAlBQ,SAAI,GAAY,IAAA,WAAI,EAAC,IAAA,YAAO,GAAE,EAAE,uBAAuB,CAAC,CAAC;QACzD,iBAAY,GAAS;YAC5B,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IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEtC,IAAI,MAAM,EAAE;YACX,GAAG,GAAG,MAAM,IAAA,mBAAQ,EAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YACxC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC7B,yBAAyB;SACzB;aAAM;YACN,IAAI,CAAC,IAAI,EAAE,CAAC;SACZ;IACF,CAAC;IACD;;QAEI;IACG,KAAK,CAAC,KAAK;QACjB,MAAM,MAAM,GAAa,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,MAAM,EAAE;YACX,IAAI;gBACH,MAAM,IAAA,iBAAM,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACxB;YAAC,OAAO,GAAG,EAAE;gBACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACnB;SACD;QACD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,IAAI,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC;IAAA,CAAC;CACF;AAlHD,4BAkHC;AAED,MAAM,CAAC,OAAO,GAAG,EAAE,QAAQ,EAAE,CAAA"}

2
app/package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "mcopy-app",
"version": "1.8.116",
"version": "1.8.117",
"lockfileVersion": 2,
"requires": true,
"packages": {

View File

@ -1,6 +1,6 @@
{
"name": "mcopy-app",
"version": "1.8.116",
"version": "1.8.117",
"description": "GUI for the mcopy small gauge film optical printer platform",
"main": "main.js",
"scripts": {

View File

@ -6,9 +6,13 @@ const mscript = new Mscript();
const assert = require('assert')
describe(`mscript module`, () => {
const script1 = 'CF\nPF\nCB\nPB\nBF\nBB';
const script2 = `CF 3\nPF 3`
const script3 = `CF\nPF`
const script1 = `
CF
PF
CB
PB
BF
BB`;
it ('Should compile very short scripts as strings', () => {
const obj = mscript.interpret(script1)
@ -19,6 +23,9 @@ describe(`mscript module`, () => {
assert.equal(obj.arr.length, 6, 'Generate sequence of 6 steps');
});
const script2 = `
CF 3
PF 3`;
it ('Should compile script with count values after command', () => {
const obj = mscript.interpret(script2)
assert.ok(typeof obj === 'object', 'Mscript produced an object response');
@ -29,7 +36,9 @@ describe(`mscript module`, () => {
assert.equal(obj.arr.length, 6, `Generate sequence of 6 steps`);
});
const script3 = `
CF
PF`
it ('Should compile with implied counts of 1', () => {
const obj = mscript.interpret(script3);
assert.ok(typeof obj === 'object', 'Mscript produced an object response');
@ -109,6 +118,21 @@ PB 200`;
assert.equal(obj.cam, 0, 'Camera state ends at 0');
assert.equal(obj.proj, 0, 'Projector state ends at 0');
});
const script2 = `
LOOP 10
CF
SET PROJ 10
PF
END`;
it('Should SET state within LOOP', () => {
const obj = mscript.interpret(script2)
assert.ok(typeof obj === 'object', 'Mscript produced an object response');
assert.ok(obj.success, 'Mscript labeled output success');
assert.equal(obj.cam, 10, 'Camera state ends at 10');
assert.equal(obj.proj, 11, 'Projector state should be 11');
});
});
describe('mscript - Loop', () => {
@ -165,7 +189,10 @@ END`;
describe('mscript - Light', () => {
//Lighting tests
const script1 = 'L 255,255,255\nCF\nPF';
const script1 = `
L 255,255,255
CF
PF`;
it ( `Should set a light value on camera steps only`, () => {
const obj = mscript.interpret(script1)
assert.ok(typeof obj === 'object', 'Mscript produced an object response');
@ -178,7 +205,11 @@ describe('mscript - Light', () => {
assert.equal(obj.meta[1], '', 'Second meta step should be ""');
});
const script2 = 'L 255,255,255\nCF\nPF\nBF';
const script2 = `
L 255,255,255
CF
PF
BF`;
it ( `Should set light to black on black_forward`, () => {
const obj = mscript.interpret(script2)
assert.ok(typeof obj === 'object', 'Mscript produced an object response');
@ -192,7 +223,13 @@ describe('mscript - Light', () => {
assert.equal(obj.meta[2], '0,0,0', 'Third meta step should be ""');
});
const script3 = 'LOOP 2\nL 1,1,1\nCF\nL 2,2,2\nCF\nEND';
const script3 = `
LOOP 2
L 1,1,1
CF
L 2,2,2
CF
END`;
it ( `Should set light within a loop`, () => {
const obj = mscript.interpret(script3);
assert.ok(typeof obj === 'object', 'Mscript produced an object response');
@ -257,6 +294,8 @@ END
assert.ok(typeof obj === 'object', 'Mscript produced an object response');
assert.ok(obj.success, 'Mscript labeled output success');
assert.equal(obj.arr.length, 20, 'Script should produce 20 steps');
assert.equal(obj.arr[0], 'C2F', 'First step should be C2F');
assert.equal(obj.arr[19], 'P2F', 'Twentieth step should be P2F');
})
const script2 = `
C2F 1000

View File

@ -1,5 +1,5 @@
{
"version": "1.8.116",
"version": "1.8.117",
"ext_port": 1111,
"profiles": {
"mcopy": {

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "mcopy",
"version": "1.8.116",
"version": "1.8.117",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "mcopy",
"version": "1.8.116",
"version": "1.8.117",
"license": "MIT",
"dependencies": {
"alert": "file:app/lib/alert",

View File

@ -1,6 +1,6 @@
{
"name": "mcopy",
"version": "1.8.116",
"version": "1.8.117",
"description": "Small gauge film optical printer platform",
"main": "build.js",
"directories": {

View File

@ -1,5 +1,5 @@
{
"version": "1.8.116",
"version": "1.8.117",
"ext_port": 1111,
"profiles": {
"mcopy": {

View File

@ -6,7 +6,11 @@ import { Log } from 'log';
import type { Logger } from 'winston';
import type { WebContents, IpcMainEvent } from 'electron';
/* class representing alert functionality */
/** @module lib/alert */
/**
* Class for pushing an alert to the UI from the backend.
*/
export class Alert {
private ipc : typeof ipcMain = ipcMain

View File

@ -36,11 +36,13 @@ const KNOWN : string[] = [
'/dev/tty.usbmodem1a141',
'/dev/ttyACM0',
'COM3'
]
];
/** @module lib/arduino */
/**
* Class representing the arduino communication features
**/
* Class representing the arduino communication features.
*/
export class Arduino {

View File

@ -17,7 +17,12 @@ interface CameraState{
capper : boolean
}
/** class representing camera functions **/
/** @module lib/cam */
/**
* Class representing camera functions.
*/
export class Camera {
public state : CameraState = {
pos : 0,

View File

@ -15,7 +15,12 @@ interface CapperState {
capper : boolean
}
/** class representing capper functions **/
/** @module lib/capper */
/**
* Class representing capper functions.
*/
export class Capper {
private state : CapperState = {
capper : false

View File

@ -10,6 +10,12 @@ import type { Capper } from 'capper';
import type { Alert } from 'alert';
import type { Config } from 'cfg';
/** @module lib/cmd */
/**
* Class representing all commands bundled into methods.
*/
export class Commands {
public proj : Projector;
public cam : Camera;

View File

@ -13,11 +13,11 @@ interface Device {
device : string;
}
/** @module lib/devices */
/**
* class representing the device discovery features
*
*
**/
* Class representing the device discovery features.
*/
export class Devices {

View File

@ -1,7 +1,9 @@
'use strict';
/**
* @module display
* @module lib/display */
/**
* Provides features for displaying a full screen display of images for the digital module.
**/

View File

@ -29,7 +29,11 @@ interface StdErr {
estimated? : number;
}
/** @class FFMPEG **/
/** @module lib/ffmpeg */
/**
* Class representing all ffmpeg features.
*/
export class FFMPEG {
private bin : string;

View File

@ -1,7 +1,5 @@
'use strict';
/** @module FFPROBE **/
import { exists } from 'fs-extra';
import { extname } from 'path';
import { exec } from 'exec';
@ -9,6 +7,12 @@ import { Log } from 'log';
import type { Logger } from 'winston';
import type { System } from 'system';
/** @module lib/ffprobe */
/**
* Class representing all ffprobe features.
*/
export class FFPROBE {
private bin : string;
private log : Logger;

View File

@ -33,9 +33,11 @@ interface FilmOutState {
files : string[]
}
/** @module lib/filmout */
/**
* @module FilmOut
**/
* Class representing all filmout features.
*/
export class FilmOut {
private id : string = 'filmout';
private videoExtensions : string[] = ['.mpg', '.mpeg', '.mov', '.mkv', '.avi', '.mp4'];

View File

@ -9,6 +9,12 @@ interface RGBA {
a : number;
}
/** @module lib/frame */
/**
* Class representing the static Frame module.
*/
export class Frame {
static async info (imagePath : string) {
let image : any;

View File

@ -2,6 +2,11 @@
import * as request from 'request'
/** @module lib/intval */
/**
* Class representing all intval3 camera features.
*/
export class Intval {
private _baseUrl : string

View File

@ -12,6 +12,11 @@ interface LightState {
color : number[]
}
/** @module lib/light */
/**
* Class representing the all light features.
*/
export class Light {
public state : LightState = { color : [0, 0, 0] }

View File

@ -1,12 +1,43 @@
'use strict';
/** @module lib/mscript */
interface MscriptOutput {
success : boolean,
arr : string[],
meta : string[],
cam : number,
proj : number,
cam2? : number
proj2? : number
}
interface MscriptLoop {
arr : string[],
meta : string[],
cam : number,
proj : number,
cam2 : number,
proj2 : number,
cmd : string,
start ? : RGB,
end ? : RGB,
fade? : boolean,
fade_len? : number,
fade_count? : number,
count ? : number
}
interface MscriptVariables {
[key : string] : number
}
interface RGB extends Array<number>{
[index : number] : number;
}
interface Alts {
[key : string] : string[]
}
const BLACK : string = '0,0,0';
const WHITE : string = '255,255,255';
const CMD : string[] = [
@ -48,7 +79,7 @@ const PROJECTOR_SECONDARY : string[] = [
'PBPF'
];
const ALTS : any = {
const ALTS : Alts = {
'CF' : ['CAMERA FORWARD', 'CAM FORWARD'],
'PF' : ['PROJECTOR FORWARD', 'PROJ FORWARD'],
'BF' : ['BLACK FORWARD', 'BLACK', 'BLANK FORWARD', 'BLANK'],
@ -77,25 +108,29 @@ const PAUSE : string = 'PAUSE';
const ALERT : string = 'ALERT';
/** class Mscript */
/** @module lib/mscript */
/**
* Class representing the mscript language.
*/
export default class Mscript {
output : any;
lines : string[];
cam : number;
cam2 : number;
proj : number;
proj2 : number;
color : string;
loops : any[];
rec : number;
two : string;
three : string;
four : string;
arr : any[];
meta : string[];
target : number;
dist : number;
variables : any;
private output : MscriptOutput;
private lines : string[];
private cam : number;
private cam2 : number;
private proj : number;
private proj2 : number;
private color : string;
private loops : MscriptLoop[];
private rec : number;
private two : string;
private three : string;
private four : string;
private arr : string[];
private meta : string[];
private target : number;
private dist : number;
private variables : MscriptVariables;
/**
* @constructor
@ -103,7 +138,13 @@ export default class Mscript {
**/
constructor () {
this.output = {};
this.output = {
success : false,
arr : [],
meta : [],
cam : 0,
proj : 0
};
}
/**
* Clear the state of the script
@ -128,7 +169,13 @@ export default class Mscript {
this.variables = {};
this.output = {};
this.output = {
success : false,
arr : [],
meta : [],
cam : 0,
proj : 0
};
}
/**
* Main function, accepts multi-line string, parses into lines
@ -223,8 +270,9 @@ export default class Mscript {
private variable (line : string) {
let parts : string[] = line.split('=');
let key : string = parts[0];
let value : any = parts[1];
let value : string = parts[1];
let update : boolean = false;
let num : number;
if (value && value.indexOf('#') !== -1) {
value = value.split('#')[0];
@ -245,14 +293,14 @@ export default class Mscript {
if (line.indexOf(',') === -1) { //if not color string
try {
value = parseInt(value);
num = parseInt(value);
} catch (err) {
//supress parsing error
}
}
//console.dir(parts)
if (!this.variables[key] || update) {
this.variables[key] = value;
this.variables[key] = num;
}
//console.dir(this.variables)
}
@ -537,7 +585,7 @@ export default class Mscript {
*
* @returns {object}
*/
private last_loop () : any {
private last_loop () : MscriptLoop {
return this.loops[this.loops.length - 1];
}
/**
@ -545,7 +593,7 @@ export default class Mscript {
*
* @returns {object} Loop array
*/
private parent_loop () : any {
private parent_loop () : MscriptLoop {
return this.loops[this.loops.length - 2];
}
/**
@ -663,9 +711,13 @@ export default class Mscript {
if (this.rec === 0) {
this.cam += this.loops[this.rec].cam;
this.proj += this.loops[this.rec].proj;
this.cam2 += this.loops[this.rec].cam2;
this.proj2 += this.loops[this.rec].proj2;
} else if (this.rec >= 1) {
this.loops[this.rec - 1].cam += this.loops[this.rec].cam;
this.loops[this.rec - 1].proj += this.loops[this.rec].proj;
this.loops[this.rec - 1].cam2 += this.loops[this.rec].cam2;
this.loops[this.rec - 1].proj2 += this.loops[this.rec].proj2;
}
}
} else if (cmd === 'CF') {
@ -808,7 +860,7 @@ export default class Mscript {
private str_to_arr (str : string, cmd : string) : string[] {
const cnt : string[] = str.split(cmd);
let c : number = parseInt(cnt[1]);
let arr : any[] = [];
let arr : string[] = [];
if (cnt[1] === '') {
c = 1;
} else {

View File

@ -3,6 +3,11 @@
import { exec } from 'exec';
import type { ExecOutput } from 'exec';
/** @module lib/processing */
/**
* Class representing all Processing camera features.
*/
export class Processing {
private _baseUrl : string
constructor (url : string) {

View File

@ -13,6 +13,11 @@ interface ProjectorState {
dir : boolean
}
/** @module lib/proj */
/**
* Class representing all projector features.
*/
export class Projector {
public state : ProjectorState = {
pos : 0,

View File

@ -9,10 +9,13 @@ import { Commands } from 'cmd';
import type { Config } from 'cfg';
import type { WebContents, IpcMainEvent } from 'electron';
/** @module lib/sequencer **/
let seq : Sequencer;
/** @module lib/sequencer */
/**
* Class representing all sequencer features.
*/
export class Sequencer {
private running : boolean = false;
private paused : boolean = false;

Some files were not shown because too many files have changed in this diff Show More