converted J.tack to mainstream v 0.1

This commit is contained in:
znetsixe
2025-07-31 09:07:11 +02:00
parent 167628a436
commit 604781f573
3 changed files with 73 additions and 54 deletions

View File

@@ -111,13 +111,15 @@ class nodeClass {
}
_updateNodeStatus() {
_updateNodeStatus() {
const v = this.source;
try {
const mode = v.currentMode; // modus is bijv. auto, manual, etc.
const state = v.state.getCurrentState(); //is bijv. operational, idle, off, etc.
const flow = Math.round(v.measurements.type("flow").variant("measured").position("downstream").getCurrentValue());
// check if measured flow is available otherwise use predicted flow
const flow = Math.round(v.measurements.type("flow").variant("predicted").position("downstream").getCurrentValue());
let deltaP = v.measurements.type("pressure").variant("predicted").position("delta").getCurrentValue();
if (deltaP !== null) {
deltaP = parseFloat(deltaP.toFixed(0));