From 108d2e23caa3221aee5f76c9443bddc8a9bc3bc4 Mon Sep 17 00:00:00 2001 From: znetsixe <73483679+znetsixe@users.noreply.github.com> Date: Sun, 30 Nov 2025 09:24:37 +0100 Subject: [PATCH] bug fixes --- src/specificClass.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/specificClass.js b/src/specificClass.js index c39e01d..b350e85 100644 --- a/src/specificClass.js +++ b/src/specificClass.js @@ -16,7 +16,7 @@ class Machine { // Load a specific curve this.model = machineConfig.asset.model; // Get the model from the machineConfig - this.curve = this.model ? loadCurve(this.model) : null; + this.curve = this.model ? loadCurve(this.model) : null; // we need to convert the curve and add units to the curve information //Init config and check if it is valid this.config = this.configUtils.initConfig(machineConfig); @@ -106,8 +106,8 @@ class Machine { const isOperational = this._isOperationalState(); if(!isOperational){ //overrule the last prediction this should be 0 now - this.measurements.type("flow").variant("predicted").position("downstream").value(0); - this.measurements.type("flow").variant("predicted").position("atEquipment").value(0); + this.measurements.type("flow").variant("predicted").position("downstream").value(0,Date.now(),this.config.general.unit); + this.measurements.type("flow").variant("predicted").position("atEquipment").value(0,Date.now(),this.config.general.unit); } } @@ -363,8 +363,8 @@ _callMeasurementHandler(measurementType, value, position, context) { // If no curve data is available, log a warning and return 0 this.logger.warn(`No curve data available for flow calculation. Returning 0.`); - this.measurements.type("flow").variant("predicted").position("downstream").value(0); - this.measurements.type("flow").variant("predicted").position("atEquipment").value(0); + this.measurements.type("flow").variant("predicted").position("downstream").value(0, Date.now(),this.config.general.unit); + this.measurements.type("flow").variant("predicted").position("atEquipment").value(0, Date.now(),this.config.general.unit); return 0; }