Add effluent output handling
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
},
|
||||
inputs: 1,
|
||||
outputs: 1,
|
||||
outputLabels: "Effluent",
|
||||
icon: "font-awesome/fa-recycle",
|
||||
label: function() {
|
||||
return this.name || "advanced-reactor";
|
||||
|
||||
@@ -31,16 +31,21 @@ module.exports = function(RED) {
|
||||
case "clock":
|
||||
reactor.updateState(msg);
|
||||
break;
|
||||
case "Influx":
|
||||
case "Influent":
|
||||
reactor.setInflux = msg;
|
||||
break;
|
||||
case "Effluent":
|
||||
reactor.setInflux = msg;
|
||||
break;
|
||||
case "OTR":
|
||||
reactor.setOTR = msg;
|
||||
break;
|
||||
default:
|
||||
console.log("Unknown topic: " + msg.topic)
|
||||
console.log("Unknown topic: " + msg.topic);
|
||||
}
|
||||
|
||||
send(reactor.getEffluent);
|
||||
|
||||
if (done) {
|
||||
done();
|
||||
}
|
||||
|
||||
4
dependencies/reactor_class.js
vendored
4
dependencies/reactor_class.js
vendored
@@ -26,6 +26,10 @@ class Reactor_CSTR {
|
||||
this.OTR = input.payload;
|
||||
}
|
||||
|
||||
get getEffluent() {
|
||||
return {topic: "Effluent", payload: {F: this.F, C_in:this.state}};
|
||||
}
|
||||
|
||||
// expect update with timestamp
|
||||
updateState(input) {
|
||||
let newTime = input.payload;
|
||||
|
||||
Reference in New Issue
Block a user