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