Rename all uses of the previously-named "digital" module to "filmout" in cam module.

This commit is contained in:
mmcwilliams 2019-06-18 16:49:49 -04:00
parent 9b17d5cd47
commit 0cff7c5794
7 changed files with 34 additions and 34 deletions

View File

@ -6,7 +6,7 @@ class Camera {
/**
*
**/
constructor(arduino, cfg, ui, dig, second = false) {
constructor(arduino, cfg, ui, filmout, second = false) {
this.state = {
pos: 0,
dir: true,
@ -18,7 +18,7 @@ class Camera {
this.arduino = arduino;
this.cfg = cfg;
this.ui = ui;
this.dig = dig;
this.filmout = filmout;
if (second)
this.id += '_second';
this.init();
@ -76,8 +76,8 @@ class Camera {
async move(frame, id) {
const cmd = this.cfg.arduino.cmd[this.id];
let ms;
if (this.dig.state.enabled) {
await this.dig.start();
if (this.filmout.state.enabled) {
await this.filmout.start();
}
if (this.intval) {
try {
@ -95,9 +95,9 @@ class Camera {
this.log.error(err);
}
}
if (this.dig.state.enabled) {
if (this.filmout.state.enabled) {
//await delay(100 * 1000);
await this.dig.end();
await this.filmout.end();
}
//this.log.info('Camera move time', { ms });
return this.end(cmd, id, ms);
@ -219,7 +219,7 @@ class Camera {
this.ui.send(this.id, { cmd: cmd, id: id, ms: ms });
}
}
module.exports = function (arduino, cfg, ui, dig, second) {
return new Camera(arduino, cfg, ui, dig, second);
module.exports = function (arduino, cfg, ui, filmout, second) {
return new Camera(arduino, cfg, ui, filmout, second);
};
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ class Camera {
/**
*
**/
constructor(arduino, cfg, ui, dig, second = false) {
constructor(arduino, cfg, ui, filmout, second = false) {
this.state = {
pos: 0,
dir: true,
@ -18,7 +18,7 @@ class Camera {
this.arduino = arduino;
this.cfg = cfg;
this.ui = ui;
this.dig = dig;
this.filmout = filmout;
if (second)
this.id += '_second';
this.init();
@ -76,8 +76,8 @@ class Camera {
async move(frame, id) {
const cmd = this.cfg.arduino.cmd[this.id];
let ms;
if (this.dig.state.enabled) {
await this.dig.start();
if (this.filmout.state.enabled) {
await this.filmout.start();
}
if (this.intval) {
try {
@ -95,9 +95,9 @@ class Camera {
this.log.error(err);
}
}
if (this.dig.state.enabled) {
if (this.filmout.state.enabled) {
//await delay(100 * 1000);
await this.dig.end();
await this.filmout.end();
}
//this.log.info('Camera move time', { ms });
return this.end(cmd, id, ms);
@ -219,7 +219,7 @@ class Camera {
this.ui.send(this.id, { cmd: cmd, id: id, ms: ms });
}
}
module.exports = function (arduino, cfg, ui, dig, second) {
return new Camera(arduino, cfg, ui, dig, second);
module.exports = function (arduino, cfg, ui, filmout, second) {
return new Camera(arduino, cfg, ui, filmout, second);
};
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ class Camera {
/**
*
**/
constructor(arduino, cfg, ui, dig, second = false) {
constructor(arduino, cfg, ui, filmout, second = false) {
this.state = {
pos: 0,
dir: true,
@ -18,7 +18,7 @@ class Camera {
this.arduino = arduino;
this.cfg = cfg;
this.ui = ui;
this.dig = dig;
this.filmout = filmout;
if (second)
this.id += '_second';
this.init();
@ -76,8 +76,8 @@ class Camera {
async move(frame, id) {
const cmd = this.cfg.arduino.cmd[this.id];
let ms;
if (this.dig.state.enabled) {
await this.dig.start();
if (this.filmout.state.enabled) {
await this.filmout.start();
}
if (this.intval) {
try {
@ -95,9 +95,9 @@ class Camera {
this.log.error(err);
}
}
if (this.dig.state.enabled) {
if (this.filmout.state.enabled) {
//await delay(100 * 1000);
await this.dig.end();
await this.filmout.end();
}
//this.log.info('Camera move time', { ms });
return this.end(cmd, id, ms);
@ -219,7 +219,7 @@ class Camera {
this.ui.send(this.id, { cmd: cmd, id: id, ms: ms });
}
}
module.exports = function (arduino, cfg, ui, dig, second) {
return new Camera(arduino, cfg, ui, dig, second);
module.exports = function (arduino, cfg, ui, filmout, second) {
return new Camera(arduino, cfg, ui, filmout, second);
};
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,7 @@ class Camera {
this.arduino = arduino;
this.cfg = cfg;
this.ui = ui;
this.dig = dig;
this.filmout = filmout;
if (second) this.id += '_second';
this.init();
}
@ -85,8 +85,8 @@ class Camera {
public async move (frame : number, id : string) {
const cmd : string = this.cfg.arduino.cmd[this.id];
let ms : number;
if (this.dig.state.enabled) {
await this.dig.start()
if (this.filmout.state.enabled) {
await this.filmout.start()
}
if (this.intval) {
try {
@ -101,9 +101,9 @@ class Camera {
this.log.error(err);
}
}
if (this.dig.state.enabled) {
if (this.filmout.state.enabled) {
//await delay(100 * 1000);
await this.dig.end();
await this.filmout.end();
}
//this.log.info('Camera move time', { ms });
return this.end(cmd, id, ms);
@ -216,6 +216,6 @@ class Camera {
}
}
module.exports = function (arduino : Arduino, cfg : any, ui : any, dig : any, second : boolean) {
return new Camera(arduino, cfg, ui, dig, second);
module.exports = function (arduino : Arduino, cfg : any, ui : any, filmout : any, second : boolean) {
return new Camera(arduino, cfg, ui, filmout, second);
}