Merge branch 'dev-Rene'
This commit is contained in:
@@ -77,6 +77,8 @@ class nodeClass {
|
||||
_setupSpecificClass(uiConfig) {
|
||||
const machineConfig = this.config;
|
||||
|
||||
console.log(`----------------> Loaded movementMode in nodeClass: ${uiConfig.movementMode}`);
|
||||
|
||||
// need extra state for this
|
||||
const stateConfig = {
|
||||
general: {
|
||||
@@ -86,7 +88,8 @@ class nodeClass {
|
||||
}
|
||||
},
|
||||
movement: {
|
||||
speed: Number(uiConfig.speed)
|
||||
speed: Number(uiConfig.speed),
|
||||
mode: uiConfig.movementMode
|
||||
},
|
||||
time: {
|
||||
starting: Number(uiConfig.startup),
|
||||
@@ -115,8 +118,8 @@ class nodeClass {
|
||||
try {
|
||||
const mode = m.currentMode;
|
||||
const state = m.state.getCurrentState();
|
||||
const flow = Math.round(m.measurements.type("flow").variant("predicted").position('downstream').getCurrentValue());
|
||||
const power = Math.round(m.measurements.type("power").variant("predicted").position('upstream').getCurrentValue());
|
||||
const flow = Math.round(m.measurements.type("flow").variant("predicted").position('downstream').getCurrentValue('m3/h'));
|
||||
const power = Math.round(m.measurements.type("power").variant("predicted").position('atequipment').getCurrentValue('kW'));
|
||||
let symbolState;
|
||||
switch(state){
|
||||
case "off":
|
||||
@@ -146,6 +149,9 @@ class nodeClass {
|
||||
case "decelerating":
|
||||
symbolState = "⏪";
|
||||
break;
|
||||
case "maintenance":
|
||||
symbolState = "🔧";
|
||||
break;
|
||||
}
|
||||
const position = m.state.getCurrentPosition();
|
||||
const roundedPosition = Math.round(position * 100) / 100;
|
||||
@@ -225,8 +231,8 @@ class nodeClass {
|
||||
//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]);
|
||||
|
||||
Reference in New Issue
Block a user