Update Salimax to SodiStore

This commit is contained in:
atef 2024-11-26 11:29:40 +01:00
parent 32191f3821
commit 1b26427e52
1 changed files with 13 additions and 4 deletions

View File

@ -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<String>();
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 ********************/