Add number of inlets input handling to advanced-reactor node

This commit is contained in:
2025-06-16 14:01:19 +02:00
parent ded9c55dc4
commit d0f8ada144
3 changed files with 32 additions and 19 deletions

View File

@@ -8,7 +8,8 @@ module.exports = function(RED) {
const Reactor = require('./dependencies/reactor_class');
const reactor = new Reactor(
config.volume,
parseFloat(config.volume),
parseInt(config.n_inlets),
[
parseFloat(config.S_O_init),
parseFloat(config.S_I_init),
@@ -29,13 +30,11 @@ module.exports = function(RED) {
node.on('input', function(msg, send, done) {
switch (msg.topic) {
case "clock":
reactor.updateState(msg);
reactor.updateState(msg.timestamp);
break;
case "Influent":
reactor.setInflux = msg;
break;
case "Effluent":
reactor.setInflux = msg;
case "Fluent":
reactor.setInfluent = msg;
reactor.updateState(msg.timestamp);
break;
case "OTR":
reactor.setOTR = msg;