update config types in controller

This commit is contained in:
Noe 2024-03-11 16:10:47 +01:00
parent 0428770b48
commit ca3c9d2903
1 changed files with 3 additions and 3 deletions

View File

@ -190,13 +190,13 @@ public static class Controller
var calibrationChargeForced = statusRecord.Config.ForceCalibrationCharge; var calibrationChargeForced = statusRecord.Config.ForceCalibrationCharge;
var batteryCalibrationChargeRequested = statusRecord.Battery is { CalibrationChargeRequested: true };//BatteryCalibrationChargeRequested(statusRecord.Battery?.CalibrationChargeRequested?? false) ; var batteryCalibrationChargeRequested = statusRecord.Battery is { CalibrationChargeRequested: true };//BatteryCalibrationChargeRequested(statusRecord.Battery?.CalibrationChargeRequested?? false) ;
var mustDoCalibrationCharge = batteryCalibrationChargeRequested || calibrationChargeForced == CalibrationChargeType.Yes || calibrationChargeForced == CalibrationChargeType.UntilEoc ; var mustDoCalibrationCharge = batteryCalibrationChargeRequested || calibrationChargeForced == CalibrationChargeType.ChargePermanently || calibrationChargeForced == CalibrationChargeType.AdditionallyOnce ;
if (statusRecord.Battery is not null) if (statusRecord.Battery is not null)
{ {
if (calibrationChargeForced == CalibrationChargeType.UntilEoc && statusRecord.Battery.Eoc ) if (calibrationChargeForced == CalibrationChargeType.AdditionallyOnce && statusRecord.Battery.Eoc )
{ {
statusRecord.Config.ForceCalibrationCharge = CalibrationChargeType.No; statusRecord.Config.ForceCalibrationCharge = CalibrationChargeType.RepetitivelyEvery;
} }
} }
return mustDoCalibrationCharge; return mustDoCalibrationCharge;