Added the feature of the forceCalibrationCharge in the config file.
This commit is contained in:
parent
c51250a380
commit
3b77c4a5b2
|
@ -188,7 +188,13 @@ public static class Controller
|
|||
|
||||
private static Boolean MustDoCalibrationCharge(this StatusRecord statusRecord)
|
||||
{
|
||||
return statusRecord.Battery?.CalibrationChargeRequested ?? false;
|
||||
var calibrationChargeForced = statusRecord.Config.ForceCalibrationCharge;
|
||||
|
||||
var batteryCalibrationChargeRequested = statusRecord.Battery?.CalibrationChargeRequested?? false ;
|
||||
|
||||
var mustDoCalibrationCharge = batteryCalibrationChargeRequested || calibrationChargeForced;
|
||||
|
||||
return mustDoCalibrationCharge;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ public class Config //TODO: let IE choose from config files (Json) and connect t
|
|||
private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true };
|
||||
|
||||
public required Double MinSoc { get; set; }
|
||||
public required UnixTime LastEoc { get; set; }
|
||||
public required Boolean ForceCalibrationCharge { get; set; }
|
||||
public required Double PConstant { get; set; }
|
||||
public required Double GridSetPoint { get; set; }
|
||||
public required Double BatterySelfDischargePower { get; set; }
|
||||
|
@ -40,7 +40,7 @@ public class Config //TODO: let IE choose from config files (Json) and connect t
|
|||
public static Config Default => new()
|
||||
{
|
||||
MinSoc = 20,
|
||||
LastEoc = UnixTime.Epoch, // TODO: remove, use new LastEoc feature from BMS
|
||||
ForceCalibrationCharge = false,
|
||||
PConstant = .5,
|
||||
GridSetPoint = 0,
|
||||
BatterySelfDischargePower = 200,
|
||||
|
@ -102,7 +102,7 @@ public class Config //TODO: let IE choose from config files (Json) and connect t
|
|||
public static Config Default => new()
|
||||
{
|
||||
MinSoc = 20,
|
||||
LastEoc = UnixTime.Epoch, // TODO: remove, use new LastEoc feature from BMS
|
||||
ForceCalibrationCharge = false,
|
||||
PConstant = .5,
|
||||
GridSetPoint = 0,
|
||||
BatterySelfDischargePower = 200,
|
||||
|
|
Loading…
Reference in New Issue