no message

This commit is contained in:
2026-04-21 20:13:26 +02:00
parent 960e56b6f9
commit 43a9d29a3a
+9 -5
View File
@@ -781,12 +781,16 @@ private function CalculateBatteryDistribution(float $pEvW, float $pSdlW): array
// Parameter: Toleranzband + Anzahl Treffer
// Beispiel: 300W Band, 2 Treffer (bei 2s Update => ~4s stabil)
$tolW = 300.0;
$needHits = 2;
// Gefilterte Werte
$fEV = $filterCurrent("EV", $rawEV, $targetEV, $tolW, $needHits);
$fSDL = $filterCurrent("SDL", $rawSDL, $targetSDL, $tolW, $needHits);
$tolPct = 0.10; // 10%
$needHits = 2; // 2 Treffer hintereinander (oder 1 für sofort)
$tolW_EV = abs($targetEV) * $tolPct;
$tolW_SDL = abs($targetSDL) * $tolPct;
$fEV = $filterCurrent("EV", $rawEV, $targetEV, $tolW_EV, $needHits);
$fSDL = $filterCurrent("SDL", $rawSDL, $targetSDL, $tolW_SDL, $needHits);
// Setzen (wichtig: SetIdentValue!)
$this->SetIdentValue("Aktuelle_Leistung_EV", (float)$fEV);