From 8996e80b68cb346c9fb97e457cd03cd6b10288a4 Mon Sep 17 00:00:00 2001
From: "p.vanderwilt"
Date: Thu, 31 Jul 2025 14:48:03 +0200
Subject: [PATCH] Fixed effluent retrieval
---
src/nodeClass.js | 2 +-
src/specificClass.js | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/nodeClass.js b/src/nodeClass.js
index d08c3f9..4ab5ffb 100644
--- a/src/nodeClass.js
+++ b/src/nodeClass.js
@@ -42,7 +42,7 @@ class nodeClass {
// Merge UI config over defaults
this.config = {
general: {
- name: uiConfig.name,
+ name: uiConfig.name || this.name,
id: this.node.id, // node.id is for the child registration process
unit: null,
logging: {
diff --git a/src/specificClass.js b/src/specificClass.js
index 596c98c..81d067c 100644
--- a/src/specificClass.js
+++ b/src/specificClass.js
@@ -6,14 +6,14 @@ class liquidFlowHandler {
this.config = config;
this.logger = new logger(this.config.general.logging.enabled, this.config.general.logging.logLevel, config.general.name);
- this.reactors = Array(2);
+ this.reactors = [null, null];
this.machines = {};
this.debit = 0;
this.childRegistrationUtils = new childRegistrationUtils(this);
}
updateState(timeStamp) {
- effluent = this.reactors[1].getEffluent();
+ effluent = this.reactors[1].getEffluent;
effluent.payload.F = this.debit;
this.reactors[0].setInfluent = effluent;
}
@@ -27,7 +27,7 @@ class liquidFlowHandler {
}
getOutput() {
- mainEffluent = this.reactors[1].getEffluent();
+ mainEffluent = this.reactors[1].getEffluent;
sideStream = structuredClone(mainEffluent);
mainEffluent.payload.F -= this.debit;
sideStream.payload.F = this.debit;