diff --git a/csharp/App/SaliMax/src/Program.cs b/csharp/App/SaliMax/src/Program.cs index b22d0c20a..c017e5839 100644 --- a/csharp/App/SaliMax/src/Program.cs +++ b/csharp/App/SaliMax/src/Program.cs @@ -118,7 +118,7 @@ internal static class Program private static async Task Run() { - "Starting SaliMax".WriteLine(); + "Starting SodiStore Max".WriteLine(); Watchdog.NotifyReady(); @@ -317,7 +317,6 @@ internal static class Program var bWarningList = new List(); - if (record.Battery != null) { var i = 0; @@ -554,7 +553,7 @@ internal static class Program const Double voltageRange = 100; // 100 Voltage configured rang for PV slope, if the configured slope change this must change also var configFile = r.Config; var inverters = r.AcDc.Devices; - var systemExportLimit = -exportLimit * 1000 ; // Conversion from Kw in W + var systemExportLimit = - exportLimit * 1000 ; // Conversion from Kw in W // the config file value is positive and limit should be negative from 0 to ... var stepSize = ClampStepSize((UInt16)Math.Floor(voltageRange/ pvInstalledPower)); // in Voltage per 1 Kw var deadBand = constantDeadBand/stepSize; @@ -564,8 +563,18 @@ internal static class Program .Select(voltage => voltage.Value) // Extract the value since we've confirmed it's non-null .Distinct() .ToList(); + + Double upperVoltage; - var upperVoltage = result.Count == 1 ? result[0] : 0; + if (result.Count == 1) + { + upperVoltage = result[0]; + } + else + { + Console.WriteLine(" Different ActiveUpperVoltage between inverters "); + return; + } /************* For debugging purposes ********************/