Fix ESLint errors and bugs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Rene De Ren
2026-03-11 13:39:57 +01:00
parent 6e9ae9fc7e
commit 8fe9c7ec05
2 changed files with 8 additions and 5 deletions

View File

@@ -203,12 +203,13 @@ class nodeClass {
this.source.handleInput(msg);
break;
*/
case 'registerChild':
case 'registerChild': {
// Register this node as a child of the parent node
const childId = msg.payload;
const childObj = this.RED.nodes.getNode(childId);
const childObj = this.RED.nodes.getNode(childId);
this.source.childRegistrationUtils.registerChild(childObj.source ,msg.positionVsParent);
break;
}
}
done();
});

View File

@@ -97,7 +97,7 @@ class pumpingStation {
// add one for group later
if( softwareType == "machineGroup" ){
/* intentionally empty */
}
// add one for pumping station
@@ -139,7 +139,7 @@ class pumpingStation {
//get downflow
const seriesExists = this.measurements.type("flow").variant("predicted").position(flowDir).exists();
if(!seriesExists){return};
if(!seriesExists){return}
const series = this.measurements.type("flow").variant("predicted").position(flowDir);
const currFLow = series.getLaggedValue(0, "m3/s"); // { value, timestamp, unit }
@@ -327,6 +327,7 @@ class pumpingStation {
const { heightOverflow, heightOutlet, surfaceArea } = this.basin;
const flowDiff = this.measurements.type("flow").variant(variant).difference({ from: "downstream", to: "upstream", unit: "m3/s" });
let remainingHeight;
switch(true){
case(flowDiff>0):
remainingHeight = Math.max(heightOverflow - level, 0);
@@ -348,6 +349,7 @@ class pumpingStation {
_calcDirection(flowDiff){
let direction = null;
const flowThreshold = 0.001;
switch (true){
case flowDiff > flowThreshold:
@@ -564,7 +566,7 @@ function createFlowMeasurementConfig(name, position) {
function createMachineConfig(name) {
curve = require('C:/Users/zn375/.node-red/public/fallbackData.json');
const curve = require('C:/Users/zn375/.node-red/public/fallbackData.json');
return {
general: {