From 70faa49450d11d9275df1c3bd5f1d49eed93e1b9 Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Tue, 20 Feb 2024 05:43:07 +0000 Subject: [PATCH] Fix serial outputter. Fix encoder path. --- api/serial/serial.mjs | 13 +++++++------ app/page_encoder.js | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/api/serial/serial.mjs b/api/serial/serial.mjs index 7d1be80..494977f 100644 --- a/api/serial/serial.mjs +++ b/api/serial/serial.mjs @@ -85,7 +85,6 @@ class SerialManager { if (!local) { this.queue = [firstLine, secondLine] } - if (!this.serial.value) return let first = Buffer.from(firstLine) let second = Buffer.from(secondLine) if (first.length > 20) { @@ -99,11 +98,13 @@ class SerialManager { second = Buffer.concat([second, Buffer.from(new Array(20 - second.length).fill(32))]) } - this.serial.value.write(Buffer.concat([ - Buffer.from('^'), - first, - second, - ])) + if (this.serial.value) { + this.serial.value.write(Buffer.concat([ + Buffer.from('^'), + first, + second, + ])) + } this.currentDisplay.value = { first: this.bufferToString(firstLine).slice(0, 20), second: this.bufferToString(secondLine).slice(0, 20), diff --git a/app/page_encoder.js b/app/page_encoder.js index 0c5b877..7134768 100644 --- a/app/page_encoder.js +++ b/app/page_encoder.js @@ -4,7 +4,7 @@ const client = require('./api/client') const Encoder = { oninit: function(vnode) { this.list_devices = { - command: 'D:\\ffmpeg.exe', + command: 'ffmpeg.exe', arguments: '-hide_banner -sources decklink', } this.list_formats = { diff --git a/package.json b/package.json index 296b174..1af9e7d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "church_streamer", - "version": "1.0.0", + "version": "1.0.1", "description": "", "main": "index.mjs", "scripts": {