1-Phasenumschaltung funktioniert jetzt besser

This commit is contained in:
2024-07-17 14:51:59 +02:00
parent a9cb24a2c3
commit fcff795137
2 changed files with 39 additions and 7 deletions

View File

@@ -177,13 +177,13 @@ public function GetCurrentData(bool $Peak) {
$powerSteps = [$maxLeistung]; $powerSteps = [$maxLeistung];
} elseif (!$Peak && $solarladen) { } elseif (!$Peak && $solarladen) {
$powerSteps = array_merge($powerSteps, $this->getRangeLimits($minLeistung, $maxLeistung)); $powerSteps = array_merge($powerSteps, $this->getRangeLimits($minLeistung, $maxLeistung, GetValue($this->GetIDForIdent("Lademodus"))));
} elseif ($solarladen && $Peak) { } elseif ($solarladen && $Peak) {
$powerSteps = [0]; $powerSteps = [0];
} else { } else {
$powerSteps += $this->getRangeLimits($minLeistung, $maxLeistung); $powerSteps += $this->getRangeLimits($minLeistung, $maxLeistung, GetValue($this->GetIDForIdent("Lademodus")));
} }
} }
@@ -377,7 +377,8 @@ public function convertPowerToCurrent($value, $Lademodus) {
} }
} }
public function getRangeLimits($min, $max) { public function getRangeLimits($min, $max, $Lademodus) {
if($Lademodus==1){
$limits = [ $limits = [
4150, 4150,
4850, 4850,
@@ -406,7 +407,38 @@ public function getRangeLimits($min, $max) {
20800, 20800,
21500, 21500,
22000 22000
];}
elseif($Lademodus==0){
$limits = [
1450,
1690,
1930,
2170,
2410,
2650,
2890,
3130,
3370,
3610,
3850,
4090,
4330,
4570,
4810,
5050,
5290,
5530,
5770,
6010,
6250,
6490,
6730,
6970,
7210,
7450,
7690
]; ];
}
$result = []; $result = [];

View File

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