auf 50 er schritte erhöht+

This commit is contained in:
2025-03-14 11:00:42 +01:00
parent cdf46f9a22
commit ec80612c04
2 changed files with 2 additions and 4 deletions

View File

@@ -61,7 +61,7 @@ class Batterie extends IPSModule
{
$maxleistung = $this->ReadPropertyInteger("MaxBatterieleistung");
$stepSize = 250; // Schrittgröße
$stepSizeSmall = 25; // Kleine Schrittgröße
$stepSizeSmall = 50; // Kleine Schrittgröße
// Array direkt als Range erzeugen (schneller als Schleife)
$array_powersteps = range(-$maxleistung, $maxleistung, $stepSize);
@@ -79,7 +79,6 @@ class Batterie extends IPSModule
// Zusätzliche Werte berechnen und auf MaxLeistung begrenzen
$newValues = array_filter([
$closestValue - 5 * $stepSizeSmall,
$closestValue - 4 * $stepSizeSmall,
$closestValue - 3 * $stepSizeSmall,
$closestValue - 2 * $stepSizeSmall,
@@ -89,7 +88,6 @@ class Batterie extends IPSModule
$closestValue + 2 * $stepSizeSmall,
$closestValue + 3 * $stepSizeSmall,
$closestValue + 4 * $stepSizeSmall,
$closestValue + 5 * $stepSizeSmall
], function ($value) use ($maxleistung) {
return $value >= -$maxleistung && $value <= $maxleistung;
});

View File

@@ -6,7 +6,7 @@
"compatibility": {
"version": "7.1"
},
"version": "1.185",
"version": "1.186",
"build": 0,
"date": 0
}