Add the apply function to the local config file
This commit is contained in:
parent
3b02b46b78
commit
3a0c96fe23
|
@ -250,6 +250,8 @@ internal static class Program
|
|||
(record.Relays is null ? "No relay Data available" : record.Relays.FiWarning ? "Alert: Fi Warning Detected" : "No Fi Warning Detected").WriteLine();
|
||||
(record.Relays is null ? "No relay Data available" : record.Relays.FiError ? "Alert: Fi Error Detected" : "No Fi Error Detected") .WriteLine();
|
||||
|
||||
record.ApplyConfigFile(minSoc:22, gridSetPoint:1);
|
||||
|
||||
record.Config.Save();
|
||||
|
||||
"===========================================".LogInfo();
|
||||
|
@ -734,7 +736,12 @@ internal static class Program
|
|||
return value == "/Battery/Dc/Power";
|
||||
}
|
||||
|
||||
|
||||
private static void ApplyConfigFile(this StatusRecord status, Double minSoc, Double gridSetPoint)
|
||||
{
|
||||
status.Config.MinSoc = minSoc;
|
||||
status.Config.GridSetPoint = gridSetPoint;
|
||||
}
|
||||
|
||||
// Method to calculate average for a variableValue in a dictionary
|
||||
static double CalculateAverage( List<Double> data)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue