Compare commits

...

2 Commits

Author SHA1 Message Date
c331ba860e Changed to new valve code 2025-11-11 13:50:57 +01:00
znetsixe
e69825a48e s88 updates and icon 2025-10-14 14:08:04 +02:00
2 changed files with 5 additions and 0 deletions

View File

@@ -254,6 +254,7 @@ class nodeClass {
const childId = msg.payload;
const childObj = this.RED.nodes.getNode(childId);
v.childRegistrationUtils.registerChild(childObj.source ,msg.positionVsParent);
v.logger.info("CHECK THIS CHILD____________", childObj);
break;
case 'setMode':
v.setMode(msg.payload);

View File

@@ -288,7 +288,9 @@ class Valve {
switch (variant) {
case ("measured"):
// put value in measurements container
this.logger.info('---------------------- updating measured flow ------------------ ');
this.measurements.type("flow").variant("measured").position(position).value(value);
this.logger.info('---------------------- updating measured flow finished ------------------ ');
// get latest downstream pressure measurement
const measuredDownStreamP = this.measurements.type("pressure").variant("measured").position("downstream").getCurrentValue(); //update downstream pressure measurement
// update predicted flow measurement
@@ -297,7 +299,9 @@ class Valve {
case ("predicted"):
// put value in measurements container
this.logger.info('---------------------- updating predicted flow ------------------ ');
this.measurements.type("flow").variant("predicted").position(position).value(value);
this.logger.info('---------------------- updating predicted flow finished ------------------ ');
const predictedDownStreamP = this.measurements.type("pressure").variant("measured").position("downstream").getCurrentValue(); //update downstream pressure measurement
this.updateDeltaPKlep(value,this.kv,predictedDownStreamP,this.rho,this.T); //update deltaP based on new flow
break;