Add the highest and lowest cell voltage.
This commit is contained in:
parent
eb25b8e91e
commit
ab70984742
|
|
@ -1,6 +1,4 @@
|
||||||
using InnovEnergy.Lib.Units;
|
using InnovEnergy.Lib.Units;
|
||||||
using InnovEnergy.Lib.Units.Composite;
|
|
||||||
using InnovEnergy.Lib.Units.Power;
|
|
||||||
|
|
||||||
namespace InnovEnergy.Lib.Devices.BatteryDeligreen;
|
namespace InnovEnergy.Lib.Devices.BatteryDeligreen;
|
||||||
|
|
||||||
|
|
@ -14,6 +12,9 @@ public class BatteryDeligreenRecords
|
||||||
public required Percent CurrentMinSoc { get; init; }
|
public required Percent CurrentMinSoc { get; init; }
|
||||||
public required Temperature TemperatureCell1 { get; init; }
|
public required Temperature TemperatureCell1 { get; init; }
|
||||||
public required Double Power { get; init; }
|
public required Double Power { get; init; }
|
||||||
|
public required Voltage LowestCellVoltage { get; init; }
|
||||||
|
public required Voltage HighestCellVoltage { get; init; }
|
||||||
|
|
||||||
|
|
||||||
// public required Temperature TemperatureCell2 { get; init; }
|
// public required Temperature TemperatureCell2 { get; init; }
|
||||||
// public required Temperature TemperatureCell3 { get; init; }
|
// public required Temperature TemperatureCell3 { get; init; }
|
||||||
|
|
@ -40,7 +41,8 @@ public class BatteryDeligreenRecords
|
||||||
Current = records.Sum(r =>r.BatteryDeligreenDataRecord.BusCurrent),
|
Current = records.Sum(r =>r.BatteryDeligreenDataRecord.BusCurrent),
|
||||||
Voltage = records.Average(r =>r.BatteryDeligreenDataRecord.BusVoltage),
|
Voltage = records.Average(r =>r.BatteryDeligreenDataRecord.BusVoltage),
|
||||||
Power = records.Sum(r => r.BatteryDeligreenDataRecord.Power),
|
Power = records.Sum(r => r.BatteryDeligreenDataRecord.Power),
|
||||||
|
LowestCellVoltage = records.Min(r => r.BatteryDeligreenDataRecord.CellVoltage.Min()),
|
||||||
|
HighestCellVoltage = records.Max(r => r.BatteryDeligreenDataRecord.CellVoltage.Max())
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue