Comment the function of next day calibration.

This commit is contained in:
atef 2024-02-20 17:46:13 +01:00
parent ba44fdcfa0
commit aa0f33fcc6
1 changed files with 3 additions and 3 deletions

View File

@ -188,7 +188,7 @@ public static class Controller
private static Boolean MustDoCalibrationCharge(this StatusRecord statusRecord)
{
var calibrationChargeForced = statusRecord.Config.ForceCalibrationCharge;
var batteryCalibrationChargeRequested = 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 ;
@ -229,12 +229,12 @@ public static class Controller
private static Boolean CheckNextCalibrationTime(DateTime nextCalibrationTime)
{
var currentDateAndTime = DateTime.Now;
Console.WriteLine(" next 9 am is: " + nextCalibrationTime);
Console.WriteLine(" next X am is: " + nextCalibrationTime);
Console.WriteLine(" currentDateAndTime: " + currentDateAndTime);
// Check if the current time is greater than or equal to the original nextCalibrationTime
var x = currentDateAndTime >= nextCalibrationTime;
Console.WriteLine(" we are checking next 10 am : " + x);
Console.WriteLine(" we are checking next X am : " + x);
return x;
}