Caught a critical error with the filmout feature. Due to work on the server feature, all filmout functionality was being routed through the server, instead of just making it an optional display source if a client is connected. The use of the server.useServer() method was implemented and the filmout display method was updated to not return early. Special thanks to Sandy McLennan for catching this one.

This commit is contained in:
Matt McWilliams 2025-05-14 20:59:59 -04:00
parent e8da086707
commit 1fbde2d366
17 changed files with 20 additions and 21 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.8.162",
"version": "1.8.163",
"ext_port": 1111,
"profiles": {
"mcopy": {

File diff suppressed because one or more lines are too long

View File

@ -78,7 +78,7 @@ class WebView {
this.digitalWindow.webContents.send('display', { src: normalSrc });
}
catch (err) {
this.log.error(err);
this.log.error('Error displaying ${normalSrc}', err);
}
this.showing = true;
return new Promise(function (resolve) {

File diff suppressed because one or more lines are too long

View File

@ -130,9 +130,9 @@ class FilmOut {
this.log.error(err, 'FILMOUT', true, true);
throw err;
}
if (this.server.displayImage(path)) {
if (this.server.useServer()) {
this.server.displayImage(path);
await (0, delay_1.delay)(20);
return;
}
await this.display.show(path);
await (0, delay_1.delay)(20);

File diff suppressed because one or more lines are too long

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

View File

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

View File

@ -1,5 +1,5 @@
{
"version": "1.8.162",
"version": "1.8.163",
"ext_port": 1111,
"profiles": {
"mcopy": {

4
package-lock.json generated
View File

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

View File

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

View File

@ -1,5 +1,5 @@
{
"version": "1.8.162",
"version": "1.8.163",
"ext_port": 1111,
"profiles": {
"mcopy": {

View File

@ -132,7 +132,7 @@ export class Camera {
const cmd : string = this.cfg.arduino.cmd[this.id];
let ms : number;
if (this.filmout.state.enabled) {
await this.filmout.start()
await this.filmout.start();
}
if (this.processing) {
try {

View File

@ -89,7 +89,7 @@ class WebView {
try {
this.digitalWindow.webContents.send('display', { src : normalSrc });
} catch (err) {
this.log.error(err);
this.log.error('Error displaying ${normalSrc}', err);
}
this.showing = true;

View File

@ -163,9 +163,9 @@ export class FilmOut {
throw err;
}
if (this.server.displayImage(path)) {
await delay(20)
return
if (this.server.useServer()) {
this.server.displayImage(path);
await delay(20);
}
await this.display.show(path);

View File

@ -124,7 +124,6 @@ export class Server {
await this.cmd(ws, 'mcopy')
this.log.info('Client connected')
this.notify('Client connected', `Forwarding digital display to client: ${address}`)
}.bind(this))
this.log.info(`Websocket server started!`)
this.log.info(`WSS [ ws://localhost:${this.wsPort} ]`)