List of devices looks strange on laptop. Attempt at fix here

This commit is contained in:
Matt McWilliams 2024-04-06 20:10:14 -04:00
parent da735779b4
commit 2779258111
10 changed files with 15 additions and 14 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.8.98",
"version": "1.8.99",
"ext_port": 1111,
"profiles": {
"mcopy": {

View File

@ -38,8 +38,8 @@ class Devices {
$('#cam_time').removeAttr('readonly');
}
for (let i in arg) {
devs.push(arg[i].arduino);
if (arg[i].arduino && arg[i].arduino !== '/dev/fake') {
if (typeof arg[i].arduino !== 'undefined' && arg[i].arduino !== '/dev/fake') {
devs.push(arg[i].arduino);
if (notify === 'Connected to ') {
notify += arg[i].arduino + ' ';
}
@ -86,6 +86,7 @@ class Devices {
//add capper features to grid
capper.enable();
}
log.info("Before stats");
seq.set(0, cfg.cmd.camera_forward);
seq.set(1, cfg.cmd.projector_forward);
grid.state(0);

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

View File

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

View File

@ -35,8 +35,8 @@ class Devices {
}
for (let i in arg) {
devs.push(arg[i].arduino);
if (arg[i].arduino && arg[i].arduino !== '/dev/fake') {
if (typeof arg[i].arduino !== 'undefined' && arg[i].arduino !== '/dev/fake') {
devs.push(arg[i].arduino);
if (notify === 'Connected to ') {
notify += arg[i].arduino + ' ';
} else {
@ -86,7 +86,7 @@ class Devices {
//add capper features to grid
capper.enable();
}
log.info("Before stats");
seq.set(0, cfg.cmd.camera_forward);
seq.set(1, cfg.cmd.projector_forward);
grid.state(0);

View File

@ -1,5 +1,5 @@
{
"version": "1.8.98",
"version": "1.8.99",
"ext_port": 1111,
"profiles": {
"mcopy": {

4
package-lock.json generated
View File

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

View File

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

View File

@ -1,5 +1,5 @@
{
"version": "1.8.98",
"version": "1.8.99",
"ext_port": 1111,
"profiles": {
"mcopy": {