Fix ESLint errors and bugs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
this.source.childRegistrationUtils.registerChild(childObj.source ,msg.positionVsParent);
|
||||
break;
|
||||
}
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user