Display heating power in the battery and fix the K1/K2 open switch
This commit is contained in:
parent
c5cb31ac88
commit
9edd875066
|
@ -106,7 +106,7 @@ public static class Topology
|
||||||
var k1 = status.Relays?.K1GridBusIsConnectedToGrid;
|
var k1 = status.Relays?.K1GridBusIsConnectedToGrid;
|
||||||
|
|
||||||
var gridBox = PhasePowersActive(gridMeterAc).TitleBox("Grid");
|
var gridBox = PhasePowersActive(gridMeterAc).TitleBox("Grid");
|
||||||
var gridFlow = SwitchedFlow(k1, a);
|
var gridFlow = SwitchedFlow(k1, a, "K1");
|
||||||
|
|
||||||
return TextBlock.AlignCenterVertical(gridBox, gridFlow);
|
return TextBlock.AlignCenterVertical(gridBox, gridFlow);
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ public static class Topology
|
||||||
var k2 = status.Relays?.K2IslandBusIsConnectedToGridBus;
|
var k2 = status.Relays?.K2IslandBusIsConnectedToGridBus;
|
||||||
|
|
||||||
var busBox = PhaseVoltages(gridMeterAc).TitleBox("Grid Bus");
|
var busBox = PhaseVoltages(gridMeterAc).TitleBox("Grid Bus");
|
||||||
var busFlow = SwitchedFlow(k2, d);
|
var busFlow = SwitchedFlow(k2, d, "K2");
|
||||||
|
|
||||||
////////////// bottom //////////////
|
////////////// bottom //////////////
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@ public static class Topology
|
||||||
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 temp = bat.Temperature.ToDisplayString();
|
var temp = bat.Temperature.ToDisplayString();
|
||||||
var heatingCurrent = bat.HeatingCurrent.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;
|
||||||
|
@ -399,7 +399,7 @@ public static class Topology
|
||||||
soc,
|
soc,
|
||||||
current,
|
current,
|
||||||
temp,
|
temp,
|
||||||
heatingCurrent,
|
heatingPower,
|
||||||
warnings,
|
warnings,
|
||||||
alarms
|
alarms
|
||||||
)
|
)
|
||||||
|
@ -458,10 +458,10 @@ public static class Topology
|
||||||
return f + g + e;
|
return f + g + e;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static TextBlock SwitchedFlow(Boolean? switchClosed, ActivePower? power)
|
private static TextBlock SwitchedFlow(Boolean? switchClosed, ActivePower? power, String kx)
|
||||||
{
|
{
|
||||||
return switchClosed is null ? TextBlock.FromString("??????????")
|
return switchClosed is null ? TextBlock.FromString("??????????")
|
||||||
: !switchClosed.Value ? Switch.Open("K1")
|
: !switchClosed.Value ? Switch.Open(kx)
|
||||||
: power is null ? TextBlock.FromString("??????????")
|
: power is null ? TextBlock.FromString("??????????")
|
||||||
: Flow.Horizontal(power);
|
: Flow.Horizontal(power);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue