forked from RnD/pumpingStation
Changed names
This commit is contained in:
@@ -109,7 +109,7 @@ class nodeClass {
|
||||
* Execute a single tick: update measurement, format and send outputs.
|
||||
*/
|
||||
_tick() {
|
||||
this.source.tick();
|
||||
//this.source.tick();
|
||||
|
||||
const raw = this.source.getOutput();
|
||||
const processMsg = this._output.formatMsg(raw, this.config, 'process');
|
||||
@@ -125,14 +125,14 @@ class nodeClass {
|
||||
_attachInputHandler() {
|
||||
this.node.on('input', (msg, send, done) => {
|
||||
switch (msg.topic) {
|
||||
case 'simulator': this.source.toggleSimulation(); break;
|
||||
case 'outlierDetection': this.source.toggleOutlierDetection(); break;
|
||||
case 'calibrate': this.source.calibrate(); break;
|
||||
case 'measurement':
|
||||
if (typeof msg.payload === 'number') {
|
||||
this.source.inputValue = parseFloat(msg.payload);
|
||||
}
|
||||
//example
|
||||
/*case 'simulator':
|
||||
this.source.toggleSimulation();
|
||||
break;
|
||||
default:
|
||||
this.source.handleInput(msg);
|
||||
break;
|
||||
*/
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user