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,
"profiles": {
"mcopy": {

View File

@ -28,8 +28,7 @@ class Devices {
}
ready(event, arg) {
return __awaiter(this, void 0, void 0, function* () {
console.log("Got to ready");
console.dir(arg);
log.info("Devices ready");
let opt;
let devs = [];
let notify = 'Connected to ';
@ -101,6 +100,7 @@ class Devices {
catch (err) {
log.error(err);
}
log.info("Got here");
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",
"version": "1.8.96",
"version": "1.8.97",
"lockfileVersion": 2,
"requires": true,
"packages": {

View File

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

View File

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

View File

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

4
package-lock.json generated
View File

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

View File

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

View File

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