Skip to content

Commit

Permalink
Removed some log messages to focus
Browse files Browse the repository at this point in the history
  • Loading branch information
tschissler committed Nov 3, 2023
1 parent e30e841 commit 7bee920
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ChargingService/ChargingController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,19 @@ public void CalculateData(object? state)

if (dataPoints.AvailableChargingCurrency.CurrentValue >= minimumChargingCurrency)
{
ConsoleHelpers.PrintMessage($"----> Available charging currency ({dataPoints.AvailableChargingCurrency.AssembleValueString()}) is high enough to start charging");
//ConsoleHelpers.PrintMessage($"----> Available charging currency ({dataPoints.AvailableChargingCurrency.AssembleValueString()}) is high enough to start charging");
dataPoints.AdjustedCharingCurrency.CurrentValue = dataPoints.AvailableChargingCurrency.CurrentValue;
chargingSessionLastChargingTime = DateTime.Now;
}
else if (!dataPoints.AutomaticCharging.CurrentValue && dataPoints.ManualChargingCurrency.CurrentValue >= 6)
{
ConsoleHelpers.PrintMessage($"----> Automatic charging is off and Manual charging currency ({dataPoints.ManualChargingCurrency.AssembleValueString()}) is greater than 0 so start charging");
//ConsoleHelpers.PrintMessage($"----> Automatic charging is off and Manual charging currency ({dataPoints.ManualChargingCurrency.AssembleValueString()}) is greater than 0 so start charging");
dataPoints.AdjustedCharingCurrency.CurrentValue = dataPoints.ManualChargingCurrency.CurrentValue;
chargingSessionLastChargingTime = DateTime.Now;
}
else if (dataPoints.AutomaticCharging.CurrentValue && dataPoints.AvailableChargingCurrency.CurrentValue >= dataPoints.MinimumActivationPVCurrency.CurrentValue)
{
ConsoleHelpers.PrintMessage($"----> Automatic charging is on and Available charging currency ({dataPoints.AvailableChargingCurrency.AssembleValueString()}) is greater than Minimum activation PV currency ({dataPoints.MinimumActivationPVCurrency.CurrentValue}) so start charging");
//ConsoleHelpers.PrintMessage($"----> Automatic charging is on and Available charging currency ({dataPoints.AvailableChargingCurrency.AssembleValueString()}) is greater than Minimum activation PV currency ({dataPoints.MinimumActivationPVCurrency.CurrentValue}) so start charging");
dataPoints.AdjustedCharingCurrency.CurrentValue = minimumChargingCurrency;
chargingSessionLastChargingTime = DateTime.Now;
}
Expand All @@ -201,27 +201,27 @@ public void CalculateData(object? state)
// Damit Ladesitzung dann nicht sofort beendet wird, wird eine Mindestdauer von 60 Sek. erzwungen.
if ((DateTime.Now - chargingSessionStartTime).TotalSeconds < 60)
{
ConsoleHelpers.PrintMessage($"----> Available charging currency too low but charging session shorter than 60sec, so continuing");
//ConsoleHelpers.PrintMessage($"----> Available charging currency too low but charging session shorter than 60sec, so continuing");
dataPoints.AdjustedCharingCurrency.CurrentValue = minimumChargingCurrency;
}
else
{
// Min. 10 Sek. weiterladen um kurfristige Aussetzer zu kompensieren
if ((DateTime.Now - chargingSessionLastChargingTime).TotalSeconds < 10)
{
ConsoleHelpers.PrintMessage($"----> Available charging currency too low but waiting for 10 more seconds before stopping but reducing to min currency yet.");
//ConsoleHelpers.PrintMessage($"----> Available charging currency too low but waiting for 10 more seconds before stopping but reducing to min currency yet.");
dataPoints.AdjustedCharingCurrency.CurrentValue = minimumChargingCurrency;
}
else
{
ConsoleHelpers.PrintMessage($"----> Available charging currency ({dataPoints.AvailableChargingCurrency.AssembleValueString()}) is not high enough to start charging");
//ConsoleHelpers.PrintMessage($"----> Available charging currency ({dataPoints.AvailableChargingCurrency.AssembleValueString()}) is not high enough to start charging");
dataPoints.AdjustedCharingCurrency.CurrentValue = 0;
}
}
}
else
{
ConsoleHelpers.PrintMessage($"----> Automatic charging is off and Manual charging currency ({dataPoints.ManualChargingCurrency.AssembleValueString()}) is not greater than 0 so don't start charging");
//ConsoleHelpers.PrintMessage($"----> Automatic charging is off and Manual charging currency ({dataPoints.ManualChargingCurrency.AssembleValueString()}) is not greater than 0 so don't start charging");
dataPoints.AdjustedCharingCurrency.CurrentValue = 0;
}
}
Expand Down

0 comments on commit 7bee920

Please sign in to comment.