Add number of inlets input handling to advanced-reactor node
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user