Add to display string
This commit is contained in:
parent
c0c65c2bb8
commit
1c4e2dee2e
|
@ -249,11 +249,11 @@ internal static class Program
|
|||
// Voltage Measurement Values
|
||||
//var inverterVoltage = new Voltage [(Int32)s.AcDc.Ac.L1.Voltage, (Int32)s.AcDc.Ac.L2.Voltage, (Int32)s.AcDc.Ac.L3.Voltage];
|
||||
//var dcLinkVoltage = s.DcDc.Dc.Link.Voltage;
|
||||
var dc48Voltage = s.DcDc.Dc.Battery.Voltage;
|
||||
var batteryVoltage = s.Battery.Dc.Voltage;
|
||||
var batterySoc = s.Battery.Soc;
|
||||
var batteryCurrent = s.Battery.Dc.Current;
|
||||
var batteryTemp = s.Battery.Temperature;
|
||||
var dc48Voltage = s.DcDc.Dc.Battery.Voltage.ToDisplayString();
|
||||
var batteryVoltage = s.Battery.Dc.Voltage.ToDisplayString;
|
||||
var batterySoc = s.Battery.Soc.ToDisplayString();
|
||||
var batteryCurrent = s.Battery.Dc.Current.ToDisplayString();
|
||||
var batteryTemp = s.Battery.Temperature.ToDisplayString();
|
||||
|
||||
var gridBusColumn = ColumnBox("Pv", "Grid Bus", "Load" , gridVoltageByPhase , gridLoadPower);
|
||||
var islandBusColumn = ColumnBox("Pv", "Island Bus", "Load" , inverterPowerByPhase, islandLoadPower);
|
||||
|
@ -268,16 +268,16 @@ internal static class Program
|
|||
var gridBox = TextBlock.AlignLeft(gridPowerByPhase).TitleBox("Grid");
|
||||
var inverterBox = TextBlock.AlignLeft(inverterPowerByAcDc).TitleBox("Inverter");
|
||||
var dcDcBox = TextBlock.AlignLeft(dc48Voltage).TitleBox("DC/DC");
|
||||
var batteryAvgBox = TextBlock.AlignLeft(batteryVoltage.ToDisplayString(),
|
||||
batterySoc.ToDisplayString(),
|
||||
batteryCurrent.ToDisplayString(),
|
||||
batteryTemp.ToDisplayString())
|
||||
var batteryAvgBox = TextBlock.AlignLeft(batteryVoltage,
|
||||
batterySoc,
|
||||
batteryCurrent,
|
||||
batteryTemp)
|
||||
.TitleBox("Battery");
|
||||
|
||||
|
||||
//////////////////// Batteries /////////////////////////
|
||||
|
||||
IReadOnlyList<TextBlock> batteryBoxes = s.Battery
|
||||
var batteryBoxes = s.Battery
|
||||
.Devices
|
||||
.Select(CreateIndividualBattery)
|
||||
.ToArray(s.Battery.Devices.Count);
|
||||
|
@ -304,10 +304,13 @@ internal static class Program
|
|||
|
||||
private static TextBlock CreateIndividualBattery(Battery48TlRecord battery, Int32 i)
|
||||
{
|
||||
|
||||
var content = TextBlock.AlignLeft(battery.Dc.Voltage.ToDisplayString(),
|
||||
battery.Soc.ToDisplayString(),
|
||||
battery.Dc.Current.ToDisplayString(),
|
||||
battery.Temperatures.Heating);
|
||||
battery.Temperatures.Cells.Average.ToDisplayString(),
|
||||
battery.BusCurrent.ToDisplayString(),
|
||||
battery.HeatingCurrent.ToDisplayString());
|
||||
|
||||
var box = content.TitleBox($"Battery {i + 1}");
|
||||
|
||||
|
@ -434,6 +437,5 @@ internal static class Program
|
|||
Console.WriteLine(error);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue