no message
This commit is contained in:
@@ -615,14 +615,22 @@ private function CalculateBatteryDistribution(float $pEvW, float $pSdlW): array
|
|||||||
}
|
}
|
||||||
|
|
||||||
$totalPower_ist = 0;
|
$totalPower_ist = 0;
|
||||||
|
print_r($batteries);
|
||||||
foreach ($batteries as $bat) {
|
foreach ($batteries as $bat) {
|
||||||
$totalPower_ist += GetValue($bat['register_bat_power']);
|
$totalPower_ist += 0; // GetValue($bat['register_bat_power']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(($pEvW + $pSdlW) === 0){
|
||||||
|
|
||||||
|
$this->SetValue("Aktuelle_Leistung_EV", $totalPower_ist/2);
|
||||||
|
$this->SetValue("Aktuelle_Leistung_SDL", $totalPower_ist/2);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
$this->SetValue("Aktuelle_Leistung_EV", $totalPower_ist/($pEvW + $pSdlW)*$pEvW);
|
$this->SetValue("Aktuelle_Leistung_EV", $totalPower_ist/($pEvW + $pSdlW)*$pEvW);
|
||||||
$this->SetValue("Aktuelle_Leistung_SDL", $totalPower_ist/($pEvW + $pSdlW)*$pSdlW);
|
$this->SetValue("Aktuelle_Leistung_SDL", $totalPower_ist/($pEvW + $pSdlW)*$pSdlW);
|
||||||
|
}
|
||||||
|
|
||||||
return $finalOutput;
|
return $finalOutput;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user