add CurrentMinSoc
This commit is contained in:
parent
9768a542b3
commit
f8cdcb420d
|
@ -13,7 +13,8 @@ public class Battery48TlRecords
|
||||||
Eoc = !empty && records.All(r => r.Eoc);
|
Eoc = !empty && records.All(r => r.Eoc);
|
||||||
Warnings = records.SelectMany(r => r.Warnings).Distinct().ToList();
|
Warnings = records.SelectMany(r => r.Warnings).Distinct().ToList();
|
||||||
Alarms = records.SelectMany(r => r.Alarms).Distinct().ToList();
|
Alarms = records.SelectMany(r => r.Alarms).Distinct().ToList();
|
||||||
Soc = empty ? 0 : records.Min(r => r.Soc.Value);
|
Soc = empty ? 0 : records.Average(r => r.Soc.Value);
|
||||||
|
CurrentMinSoc = empty ? 0 : records.Min(r => r.Soc.Value);
|
||||||
Temperature = records.Any() ? records.Average(b => b.Temperatures.Cells.Average.Value) : 0;
|
Temperature = records.Any() ? records.Average(b => b.Temperatures.Cells.Average.Value) : 0;
|
||||||
HeatingCurrent = records.Any() ? records.Sum(b => b.HeatingCurrent) : 0;
|
HeatingCurrent = records.Any() ? records.Sum(b => b.HeatingCurrent) : 0;
|
||||||
|
|
||||||
|
@ -31,6 +32,7 @@ public class Battery48TlRecords
|
||||||
public IReadOnlyList<String> Warnings { get; init; }
|
public IReadOnlyList<String> Warnings { get; init; }
|
||||||
public IReadOnlyList<String> Alarms { get; init; }
|
public IReadOnlyList<String> Alarms { get; init; }
|
||||||
public Percent Soc { get; init; }
|
public Percent Soc { get; init; }
|
||||||
|
public Percent CurrentMinSoc { get; init; }
|
||||||
public Temperature Temperature { get; init; }
|
public Temperature Temperature { get; init; }
|
||||||
public Current HeatingCurrent { get; init; }
|
public Current HeatingCurrent { get; init; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue