no message

This commit is contained in:
mh
2026-05-05 15:13:11 +02:00
parent ce07977b20
commit 9323554526
+6 -3
View File
@@ -543,8 +543,8 @@ class Bat_EV_SDL_V4 extends IPSModule
$rawSDL = $pSdlW * $factor; $rawSDL = $pSdlW * $factor;
} else { } else {
// KEIN Sprung mehr auf Soll! // KEIN Sprung mehr auf Soll!
$rawEV = 0.0; $rawEV = (float)$this->GetBufferSafe("CUR_EV_VAL");
$rawSDL = 0.0; $rawSDL = (float)$this->GetBufferSafe("CUR_SDL_VAL");
} }
$filterAktiv = $this->ReadPropertyBoolean("FilterAktiv"); $filterAktiv = $this->ReadPropertyBoolean("FilterAktiv");
@@ -629,7 +629,8 @@ class Bat_EV_SDL_V4 extends IPSModule
$hits = 0; $hits = 0;
} }
} else { } else {
$lastVal = $this->MoveTowards($lastVal, $pending, $maxRampWPerSec * $dt); // Rohwert passt nicht zum Sollwert:
// NICHT Richtung Soll laufen, sondern alten Wert halten.
$hits = 0; $hits = 0;
} }
@@ -847,6 +848,8 @@ class Bat_EV_SDL_V4 extends IPSModule
private function MoveTowards(float $current, float $target, float $maxStep): float private function MoveTowards(float $current, float $target, float $maxStep): float
{ {
$maxStep = max(0.0, $maxStep);
if (abs($target - $current) <= $maxStep) { if (abs($target - $current) <= $maxStep) {
return $target; return $target;
} }