diff --git a/src/configs/pumpingStation.json b/src/configs/pumpingStation.json index d6a0668..42bf044 100644 --- a/src/configs/pumpingStation.json +++ b/src/configs/pumpingStation.json @@ -478,6 +478,30 @@ "min": 0, "description": "Allowable error between inflow and outflow before adjustments are triggered (m3/h)." } + }, + "thresholdLowVolume": { + "default": 10, + "rules": { + "type": "number", + "min": 0, + "description": "Volume threshold (%) below which the station will shut down pumps to prevent dry running." + } + }, + "thresholdHighVolume": { + "default": 90, + "rules": { + "type": "number", + "min": 0, + "description": "Volume threshold (%) above which the station will trigger high level alarms." + } + }, + "timeThreshholdSeconds": { + "default": 120, + "rules": { + "type": "number", + "min": 0, + "description": "Time threshold (seconds) used in volume-based safety checks." + } } }, "alarms": { diff --git a/src/helper/menuUtils.js b/src/helper/menuUtils.js index ebed6b8..4cb6b84 100644 --- a/src/helper/menuUtils.js +++ b/src/helper/menuUtils.js @@ -180,7 +180,6 @@ async apiCall(node) { // Only add tagCode to URL if it exists if (tagCode) { apiUrl += `&asset_tag_number=${tagCode}`; - console.log('hello there'); } assetregisterAPI += apiUrl; @@ -461,10 +460,6 @@ populateModels( // Store only the metadata for the selected model node["modelMetadata"] = modelData.find((model) => model.name === selectedModel); }); - /* - console.log('hello here I am:'); - console.log(node["modelMetadata"]); -*/ }); }) diff --git a/src/helper/menuUtils_DEPRECATED.js b/src/helper/menuUtils_DEPRECATED.js index ebed6b8..95cae41 100644 --- a/src/helper/menuUtils_DEPRECATED.js +++ b/src/helper/menuUtils_DEPRECATED.js @@ -180,7 +180,6 @@ async apiCall(node) { // Only add tagCode to URL if it exists if (tagCode) { apiUrl += `&asset_tag_number=${tagCode}`; - console.log('hello there'); } assetregisterAPI += apiUrl; @@ -461,10 +460,7 @@ populateModels( // Store only the metadata for the selected model node["modelMetadata"] = modelData.find((model) => model.name === selectedModel); }); - /* - console.log('hello here I am:'); - console.log(node["modelMetadata"]); -*/ + }); }) diff --git a/src/measurements/Measurement.js b/src/measurements/Measurement.js index 761432b..0848657 100644 --- a/src/measurements/Measurement.js +++ b/src/measurements/Measurement.js @@ -113,7 +113,7 @@ class Measurement { // Create a new measurement that is the difference between two positions static createDifference(upstreamMeasurement, downstreamMeasurement) { - console.log('hello:'); + if (upstreamMeasurement.type !== downstreamMeasurement.type || upstreamMeasurement.variant !== downstreamMeasurement.variant) { throw new Error('Cannot calculate difference between different measurement types or variants');