diff --git a/src/nodeClass.js b/src/nodeClass.js index b00364f..e0a4b2a 100644 --- a/src/nodeClass.js +++ b/src/nodeClass.js @@ -177,8 +177,8 @@ class nodeClass { //pumping station needs time based ticks to recalc level when predicted this.source.tick(); const raw = this.source.getOutput(); - const processMsg = this._output.formatMsg(raw, this.config, 'process'); - const influxMsg = this._output.formatMsg(raw, this.config, 'influxdb'); + const processMsg = this._output.formatMsg(raw, this.source.config, 'process'); + const influxMsg = this._output.formatMsg(raw, this.source.config, 'influxdb'); // Send only updated outputs on ports 0 & 1 this.node.send([processMsg, influxMsg]); diff --git a/src/specificClass.js b/src/specificClass.js index c306f96..d4dbdfe 100644 --- a/src/specificClass.js +++ b/src/specificClass.js @@ -519,8 +519,16 @@ class PumpingStation { }); }); - output.state = this.state; - output.basin = this.basin; + output.direction = this.state.direction; + output.flowSource = this.state.flowSource; + output.timeleft = this.state.seconds; + output.volEmptyBasin = this.basin.volEmptyBasin; + output.heightInlet = this.basin.heightInlet; + output.heightOverflow = this.basin.heightOverflow; + output.maxVol = this.basin.maxVol; + output.minVol = this.basin.minVol; + output.maxVolOverflow = this.basin.maxVolOverflow; + output.minVolOut = this.basin.minVolOut; return output; } }