no message
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -846,14 +847,16 @@ 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
|
||||||
{
|
{
|
||||||
if (abs($target - $current) <= $maxStep) {
|
$maxStep = max(0.0, $maxStep);
|
||||||
return $target;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $current + (($target > $current) ? $maxStep : -$maxStep);
|
if (abs($target - $current) <= $maxStep) {
|
||||||
|
return $target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $current + (($target > $current) ? $maxStep : -$maxStep);
|
||||||
|
}
|
||||||
|
|
||||||
private function SetIdentValue(string $ident, $value): void
|
private function SetIdentValue(string $ident, $value): void
|
||||||
{
|
{
|
||||||
$id = @$this->GetIDForIdent($ident);
|
$id = @$this->GetIDForIdent($ident);
|
||||||
|
|||||||
Reference in New Issue
Block a user