Manual merge from capper branch: all changes to devices library.

This commit is contained in:
Matt McWilliams 2023-08-06 15:04:33 -04:00
parent 386285d48c
commit e7e7f86ab3
10 changed files with 22 additions and 25 deletions

View File

@ -1,5 +1,5 @@
{ {
"version": "1.7.25", "version": "1.7.26",
"ext_port": 1111, "ext_port": 1111,
"profiles": { "profiles": {
"mcopy": { "mcopy": {

View File

@ -146,8 +146,8 @@ class Devices {
await this.arduino.fakeConnect('projector'); await this.arduino.fakeConnect('projector');
} }
catch (err) { catch (err) {
console.error(err); this.log.error(`Error connecting to fake PROjECTOR device`, 'SERIAL', true, true);
this.log.error(`Error connecting to fake PRONECTOR device`, 'SERIAL', true, true); this.log.error(err);
return false; return false;
} }
this.log.info('Connected to fake PROJECTOR device', 'SERIAL', true, true); this.log.info('Connected to fake PROJECTOR device', 'SERIAL', true, true);
@ -162,8 +162,8 @@ class Devices {
await this.arduino.fakeConnect('camera'); await this.arduino.fakeConnect('camera');
} }
catch (err) { catch (err) {
console.error(err);
this.log.error(`Error connecting to fake CAMERA device`, 'SERIAL', true, true); this.log.error(`Error connecting to fake CAMERA device`, 'SERIAL', true, true);
this.log.error(err);
return false; return false;
} }
this.log.info('Connected to fake CAMERA device', 'SERIAL', true, true); this.log.info('Connected to fake CAMERA device', 'SERIAL', true, true);
@ -178,8 +178,8 @@ class Devices {
await this.arduino.fakeConnect('light'); await this.arduino.fakeConnect('light');
} }
catch (err) { catch (err) {
console.error(err);
this.log.error(`Error connecting to fake LIGHT device`, 'SERIAL', true, true); this.log.error(`Error connecting to fake LIGHT device`, 'SERIAL', true, true);
this.log.error(err);
return false; return false;
} }
this.log.info('Connected to fake LIGHT device', 'SERIAL', true, true); this.log.info('Connected to fake LIGHT device', 'SERIAL', true, true);
@ -194,8 +194,8 @@ class Devices {
await this.arduino.fakeConnect('capper'); await this.arduino.fakeConnect('capper');
} }
catch (err) { catch (err) {
console.error(err);
this.log.error(`Error connecting to fake CAPPER device`, 'SERIAL', true, true); this.log.error(`Error connecting to fake CAPPER device`, 'SERIAL', true, true);
this.log.error(err);
return false; return false;
} }
this.log.info('Connected to fake CAPPER device', 'SERIAL', true, true); this.log.info('Connected to fake CAPPER device', 'SERIAL', true, true);
@ -317,7 +317,7 @@ class Devices {
connectSuccess = await this.arduino.connect('camera_second', serial, false); connectSuccess = await this.arduino.connect('camera_second', serial, false);
} }
catch (err) { catch (err) {
console.error(err); this.log.error(err);
return false; return false;
} }
} }
@ -513,8 +513,6 @@ class Devices {
if (this.settings.state.camera && this.settings.state.camera.intval) { if (this.settings.state.camera && this.settings.state.camera.intval) {
c.intval = this.settings.state.camera.intval; c.intval = this.settings.state.camera.intval;
} }
//console.dir(this.arduino.alias);
//console.dir(this.arduino.serial);
return this.ready(p, c, l, cs, ps, capper); return this.ready(p, c, l, cs, ps, capper);
} }
/** /**

File diff suppressed because one or more lines are too long

2
app/package-lock.json generated
View File

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

View File

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

View File

@ -1,5 +1,5 @@
{ {
"version": "1.7.25", "version": "1.7.26",
"ext_port": 1111, "ext_port": 1111,
"profiles": { "profiles": {
"mcopy": { "mcopy": {

4
package-lock.json generated
View File

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

View File

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

View File

@ -1,5 +1,5 @@
{ {
"version": "1.7.25", "version": "1.7.26",
"ext_port": 1111, "ext_port": 1111,
"profiles": { "profiles": {
"mcopy": { "mcopy": {

View File

@ -162,8 +162,8 @@ class Devices {
try { try {
await this.arduino.fakeConnect('projector') await this.arduino.fakeConnect('projector')
} catch (err) { } catch (err) {
console.error(err) this.log.error(`Error connecting to fake PROjECTOR device`, 'SERIAL', true, true)
this.log.error(`Error connecting to fake PRONECTOR device`, 'SERIAL', true, true) this.log.error(err)
return false return false
} }
this.log.info('Connected to fake PROJECTOR device', 'SERIAL', true, true) this.log.info('Connected to fake PROJECTOR device', 'SERIAL', true, true)
@ -177,8 +177,8 @@ class Devices {
try { try {
await this.arduino.fakeConnect('camera') await this.arduino.fakeConnect('camera')
} catch (err) { } catch (err) {
console.error(err)
this.log.error(`Error connecting to fake CAMERA device`, 'SERIAL', true, true) this.log.error(`Error connecting to fake CAMERA device`, 'SERIAL', true, true)
this.log.error(err)
return false return false
} }
this.log.info('Connected to fake CAMERA device', 'SERIAL', true, true) this.log.info('Connected to fake CAMERA device', 'SERIAL', true, true)
@ -192,8 +192,8 @@ class Devices {
try { try {
await this.arduino.fakeConnect('light') await this.arduino.fakeConnect('light')
} catch (err) { } catch (err) {
console.error(err)
this.log.error(`Error connecting to fake LIGHT device`, 'SERIAL', true, true) this.log.error(`Error connecting to fake LIGHT device`, 'SERIAL', true, true)
this.log.error(err)
return false return false
} }
this.log.info('Connected to fake LIGHT device', 'SERIAL', true, true) this.log.info('Connected to fake LIGHT device', 'SERIAL', true, true)
@ -208,8 +208,8 @@ class Devices {
try { try {
await this.arduino.fakeConnect('capper') await this.arduino.fakeConnect('capper')
} catch (err) { } catch (err) {
console.error(err)
this.log.error(`Error connecting to fake CAPPER device`, 'SERIAL', true, true) this.log.error(`Error connecting to fake CAPPER device`, 'SERIAL', true, true)
this.log.error(err)
return false return false
} }
this.log.info('Connected to fake CAPPER device', 'SERIAL', true, true) this.log.info('Connected to fake CAPPER device', 'SERIAL', true, true)
@ -315,7 +315,7 @@ class Devices {
try { try {
connectSuccess = await this.arduino.connect('camera_second', serial, false) connectSuccess = await this.arduino.connect('camera_second', serial, false)
} catch (err) { } catch (err) {
console.error(err) this.log.error(err)
return false return false
} }
} else if (device === 'camera,camera_second') { } else if (device === 'camera,camera_second') {
@ -506,8 +506,7 @@ class Devices {
c.intval = this.settings.state.camera.intval c.intval = this.settings.state.camera.intval
} }
//console.dir(this.arduino.alias);
//console.dir(this.arduino.serial);
return this.ready(p, c, l, cs, ps, capper) return this.ready(p, c, l, cs, ps, capper)
} }
/** /**