Fixed bugs and hard coded config for now.
This commit is contained in:
@@ -5,9 +5,18 @@ module.exports = function(RED) {
|
||||
|
||||
let name = config.name;
|
||||
|
||||
node.on('input', function(msg) {
|
||||
msg.payload = msg.payload.toLowerCase();
|
||||
node.send(msg);
|
||||
const Reactor = require('./dependencies/reactor_class');
|
||||
|
||||
const reactor = new Reactor(Array(13).fill(0.001));
|
||||
|
||||
node.on('input', function(msg, send, done) {
|
||||
if (msg.topic == "clock") {
|
||||
reactor.updateState(msg);
|
||||
}
|
||||
|
||||
if (done) {
|
||||
done();
|
||||
}
|
||||
});
|
||||
}
|
||||
RED.nodes.registerType("advanced-reactor", reactor);
|
||||
|
||||
Reference in New Issue
Block a user