Devices, serial and type terms were updated everywhere in code except in the settings object.

This commit is contained in:
Matt McWilliams 2024-04-06 20:29:56 -04:00
parent edc72a5486
commit 6778f871db
9 changed files with 13 additions and 11 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.8.100",
"version": "1.8.101",
"ext_port": 1111,
"profiles": {
"mcopy": {

View File

@ -126,7 +126,7 @@ class Devices {
this.log.error('Error distinguishing device', err);
return null;
}
this.remember('arduino', device, serial);
this.remember(device, serial, 'arduino');
this.log.info(`Determined ${device} to be ${device}`, 'SERIAL', true, true);
await (0, delay_1.delay)(100);
try {
@ -521,13 +521,15 @@ class Devices {
remember(device, serial, type) {
let deviceEntry;
const match = this.settings.state.devices.filter((dev) => {
if (dev[device] && dev[device] === serial) {
if (typeof dev.device !== 'undefined' && dev.device === device &&
typeof dev.serial !== 'undefined' && dev.serial === serial) {
return dev;
}
});
if (match.length === 0) {
deviceEntry = {
device,
type,
serial
};
this.settings.state.devices.push(deviceEntry);

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

View File

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

View File

@ -1,5 +1,5 @@
{
"version": "1.8.100",
"version": "1.8.101",
"ext_port": 1111,
"profiles": {
"mcopy": {

4
package-lock.json generated
View File

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

View File

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

View File

@ -1,5 +1,5 @@
{
"version": "1.8.100",
"version": "1.8.101",
"ext_port": 1111,
"profiles": {
"mcopy": {