Update to the battery power instead of Dc Dc power for the variable "l"

This commit is contained in:
atef 2023-10-02 14:50:10 +02:00
parent b1d553870e
commit 8f876a37bd
1 changed files with 5 additions and 3 deletions

View File

@ -72,7 +72,7 @@ public static class Topology
var h = g; var h = g;
var i = status.PvOnDc?.Dc.Power.Value; var i = status.PvOnDc?.Dc.Power.Value;
var k = status.DcDc.Dc.Link.Power.Value; var k = status.DcDc.Dc.Link.Power.Value;
var l = k; var l = status.Battery is not null ? status.Battery.Dc.Power.Value : 0;
var j = status.LoadOnDc?.Power.Value; var j = status.LoadOnDc?.Power.Value;
var d = status.AcGridToAcIsland?.Power.Active; var d = status.AcGridToAcIsland?.Power.Active;
var c = status.LoadOnAcGrid?.Power.Active; var c = status.LoadOnAcGrid?.Power.Active;
@ -396,9 +396,10 @@ public static class Topology
var voltage = bat.Dc.Voltage.ToDisplayString(); var voltage = bat.Dc.Voltage.ToDisplayString();
var soc = bat.Devices.Any() ? bat.Devices.Average(b => b.Soc).Percent().ToDisplayString() : "0"; var soc = bat.Devices.Any() ? bat.Devices.Average(b => b.Soc).Percent().ToDisplayString() : "0";
var current = bat.Dc.Current.ToDisplayString(); var current = bat.Dc.Current.ToDisplayString();
var busCurrent = bat.Devices.Any() ? bat.Devices.Sum(b => b.BusCurrent).A().ToDisplayString() : "0";
var temp = bat.Temperature.ToDisplayString(); var temp = bat.Temperature.ToDisplayString();
var heatingPower = bat.HeatingPower.ToDisplayString(); var heatingPower = bat.HeatingPower.ToDisplayString();
var alarms = bat.Alarms.Count + " Alarms"; var alarms = bat.Alarms.Count + " Alarms";
var warnings = bat.Warnings.Count + " Warnings"; var warnings = bat.Warnings.Count + " Warnings";
var nBatteries = bat.Devices.Count; var nBatteries = bat.Devices.Count;
@ -408,6 +409,7 @@ public static class Topology
voltage, voltage,
soc, soc,
current, current,
busCurrent,
temp, temp,
heatingPower, heatingPower,
warnings, warnings,
@ -447,7 +449,7 @@ public static class Topology
battery.Soc.ToDisplayString(), battery.Soc.ToDisplayString(),
battery.Dc.Current.ToDisplayString() + " C/D", battery.Dc.Current.ToDisplayString() + " C/D",
battery.Temperatures.Cells.Average.ToDisplayString(), battery.Temperatures.Cells.Average.ToDisplayString(),
battery.BusCurrent.ToDisplayString() + " T", battery.BusCurrent.ToDisplayString() ,
batteryWarnings, batteryWarnings,
batteryAlarms, batteryAlarms,
battery.HeatingCurrent.ToDisplayString() + " H" battery.HeatingCurrent.ToDisplayString() + " H"