Change from falg to requested
This commit is contained in:
parent
9bbccfd34b
commit
26422284dd
|
@ -209,7 +209,7 @@ public static class Controller
|
||||||
// no need to return false in case of EOC reached
|
// no need to return false in case of EOC reached
|
||||||
// because the BMS will set the Time Since TOC to 0 as soon a battery reach EOC
|
// because the BMS will set the Time Since TOC to 0 as soon a battery reach EOC
|
||||||
// then Calibration Charge flag will be set false by the software
|
// then Calibration Charge flag will be set false by the software
|
||||||
return statusRecord.Battery.CalibrationChargeFlag;
|
return statusRecord.Battery.CalibrationChargeRequested;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ public partial class Battery48TlRecord
|
||||||
|
|
||||||
public DcPower HeatingPower => HeatingCurrent * Dc.Voltage;
|
public DcPower HeatingPower => HeatingCurrent * Dc.Voltage;
|
||||||
|
|
||||||
public Boolean CalibrationChargeFlag => TimeSinceTOC > OneWeekInMinutes;
|
public Boolean CalibrationChargeRequested => TimeSinceTOC > OneWeekInMinutes;
|
||||||
|
|
||||||
public readonly struct Leds_
|
public readonly struct Leds_
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class Battery48TlRecords
|
||||||
public required Temperature Temperature { get; init; }
|
public required Temperature Temperature { get; init; }
|
||||||
public required DcPower HeatingPower { get; init; }
|
public required DcPower HeatingPower { get; init; }
|
||||||
public required UInt16 TimeSinceToc { get; init; }
|
public required UInt16 TimeSinceToc { get; init; }
|
||||||
public required Boolean CalibrationChargeFlag { get; init; }
|
public required Boolean CalibrationChargeRequested { get; init; }
|
||||||
|
|
||||||
public required IReadOnlyList<Battery48TlRecord> Devices { get; init; }
|
public required IReadOnlyList<Battery48TlRecord> Devices { get; init; }
|
||||||
|
|
||||||
|
@ -26,16 +26,16 @@ public class Battery48TlRecords
|
||||||
|
|
||||||
return new Battery48TlRecords
|
return new Battery48TlRecords
|
||||||
{
|
{
|
||||||
Devices = records,
|
Devices = records,
|
||||||
Eoc = records.All(r => r.Eoc),
|
Eoc = 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 = records.Average(r => r.Soc.Value),
|
Soc = records.Average(r => r.Soc.Value),
|
||||||
CurrentMinSoc = records.Min(r => r.Soc.Value),
|
CurrentMinSoc = records.Min(r => r.Soc.Value),
|
||||||
Temperature = records.Average(b => b.Temperatures.Cells.Average.Value),
|
Temperature = records.Average(b => b.Temperatures.Cells.Average.Value),
|
||||||
HeatingPower = records.Sum(b => b.HeatingPower),
|
HeatingPower = records.Sum(b => b.HeatingPower),
|
||||||
TimeSinceToc = records.Max(r => r.TimeSinceTOC),
|
TimeSinceToc = records.Max(r => r.TimeSinceTOC),
|
||||||
CalibrationChargeFlag = records.Any(r => r.CalibrationChargeFlag),
|
CalibrationChargeRequested = records.Any(r => r.CalibrationChargeRequested),
|
||||||
|
|
||||||
Dc = new()
|
Dc = new()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue