updating to corrospend with reality

This commit is contained in:
znetsixe
2025-11-27 17:46:24 +01:00
parent d91609b3a4
commit 288bd244dd
3 changed files with 252 additions and 64 deletions

View File

@@ -66,6 +66,15 @@ class nodeClass {
minHeightBasedOn: uiConfig.minHeightBasedOn,
basinBottomRef: uiConfig.basinBottomRef,
},
control:{
mode: uiConfig.controlMode,
levelbased:{
startLevel:uiConfig.startLevel,
stopLevel:uiConfig.stopLevel,
minFlowLevel:uiConfig.minFlowLevel,
maxFlowLevel:uiConfig.maxFlowLevel
}
},
safety:{
enableDryRunProtection: uiConfig.enableDryRunProtection,
dryRunThresholdPercent: uiConfig.dryRunThresholdPercent,
@@ -216,6 +225,16 @@ class nodeClass {
.getCurrentValue('m3');
this.source.calibratePredictedVolume(calibratedVolume);
break;
case 'q_in': {
// payload can be number or { value, unit, timestamp }
const val = Number(msg.payload);
const unit = msg?.unit || 'm3/s';
const ts = msg?.timestamp || Date.now();
this.source.setManualInflow(val, ts, unit);
break;
}
}
done();
});