Figure out why devices.ready() is not reaching end of method on Mono laptop

This commit is contained in:
Matt McWilliams 2024-04-06 19:53:04 -04:00
parent d34172d8e9
commit b7e2e912f4
10 changed files with 16 additions and 17 deletions

View File

@ -1,5 +1,5 @@
{ {
"version": "1.8.96", "version": "1.8.97",
"ext_port": 1111, "ext_port": 1111,
"profiles": { "profiles": {
"mcopy": { "mcopy": {

View File

@ -28,8 +28,7 @@ class Devices {
} }
ready(event, arg) { ready(event, arg) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
console.log("Got to ready"); log.info("Devices ready");
console.dir(arg);
let opt; let opt;
let devs = []; let devs = [];
let notify = 'Connected to '; let notify = 'Connected to ';
@ -101,6 +100,7 @@ class Devices {
catch (err) { catch (err) {
log.error(err); log.error(err);
} }
log.info("Got here");
return event.returnValue = true; return event.returnValue = true;
}); });
} }

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.8.96", "version": "1.8.97",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {

View File

@ -1,6 +1,6 @@
{ {
"name": "mcopy-app", "name": "mcopy-app",
"version": "1.8.96", "version": "1.8.97",
"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

@ -23,8 +23,7 @@ class Devices {
} }
async ready (event : any, arg : any) { async ready (event : any, arg : any) {
console.log("Got to ready"); log.info("Devices ready");
console.dir(arg)
let opt : any; let opt : any;
let devs : any[] = []; let devs : any[] = [];
let notify : string = 'Connected to '; let notify : string = 'Connected to ';
@ -39,9 +38,9 @@ class Devices {
devs.push(arg[i].arduino); devs.push(arg[i].arduino);
if (arg[i].arduino && arg[i].arduino !== '/dev/fake') { if (arg[i].arduino && arg[i].arduino !== '/dev/fake') {
if (notify === 'Connected to ') { if (notify === 'Connected to ') {
notify += arg[i].arduino + ' ' notify += arg[i].arduino + ' ';
} else { } else {
notify += `& ${arg[i].arduino}` notify += `& ${arg[i].arduino}`;
} }
} }
opt = $('<option>'); opt = $('<option>');
@ -103,7 +102,7 @@ class Devices {
} catch (err) { } catch (err) {
log.error(err); log.error(err);
} }
log.info("Got here");
return event.returnValue = true; return event.returnValue = true;
} }
@ -131,7 +130,7 @@ class Devices {
for (let key of keys) { for (let key of keys) {
cfg[key] = keys[key]; cfg[key] = keys[key];
} }
$('#profile').val(profile) $('#profile').val(profile);
timing.reset(p); timing.reset(p);
if (typeof p.light !== 'undefined' && p.light === false) { if (typeof p.light !== 'undefined' && p.light === false) {
light.disable(); light.disable();

View File

@ -1,5 +1,5 @@
{ {
"version": "1.8.96", "version": "1.8.97",
"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.8.96", "version": "1.8.97",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "mcopy", "name": "mcopy",
"version": "1.8.96", "version": "1.8.97",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"alert": "file:app/lib/alert", "alert": "file:app/lib/alert",

View File

@ -1,6 +1,6 @@
{ {
"name": "mcopy", "name": "mcopy",
"version": "1.8.96", "version": "1.8.97",
"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.8.96", "version": "1.8.97",
"ext_port": 1111, "ext_port": 1111,
"profiles": { "profiles": {
"mcopy": { "mcopy": {