fix Config.cs for debug mode

This commit is contained in:
ig 2023-08-15 15:45:43 +02:00
parent 31c725520f
commit d633564b93
2 changed files with 17 additions and 15 deletions

View File

@ -34,8 +34,6 @@ internal static class Program
[DllImport("libsystemd.so.0")] [DllImport("libsystemd.so.0")]
private static extern Int32 sd_notify(Int32 unsetEnvironment, String state); private static extern Int32 sd_notify(Int32 unsetEnvironment, String state);
const String batteryTty = "/dev/ttyUSB0";
private static readonly UnixTimeSpan UpdateInterval = UnixTimeSpan.FromSeconds(2); private static readonly UnixTimeSpan UpdateInterval = UnixTimeSpan.FromSeconds(2);
private static readonly IReadOnlyList<Byte> BatteryNodes; private static readonly IReadOnlyList<Byte> BatteryNodes;

View File

@ -43,19 +43,23 @@ public class Config //TODO: let IE choose from config files (Json) and connect t
#if DEBUG #if DEBUG
public static Config Default => new() public static Config Default => new()
{ {
MinSoc = 20, MinSoc = 20,
LastEoc = UnixTime.Epoch, // TODO: remove, use new LastEoc feature from BMS LastEoc = UnixTime.Epoch, // TODO: remove, use new LastEoc feature from BMS
PConstant = .5, PConstant = .5,
GridSetPoint = 0, GridSetPoint = 0,
BatterySelfDischargePower = 200, BatterySelfDischargePower = 200,
HoldSocZone = 1, // TODO: find better name, HoldSocZone = 1, // TODO: find better name,
MinDcBusVoltage = 690, MinDcLinkVoltageFromAcDc = 690,
ReferenceDcBusVoltage = 750, ReferenceDcLinkVoltageFromAcDc = 750,
MaxDcBusVoltage = 810, MaxDcLinkVoltageFromAcDc = 810,
LowerDcBusVoltageWindow = 50, LowerDcLinkVoltageFromDc = 50,
ReferenceDcBusVoltageWindow = 750, ReferenceDcLinkVoltageFromDc = 750,
UpperDcBusVoltageWindow = 50, UpperDcLinkVoltageFromDc = 50,
Devices = new () MaxBatteryChargingCurrent = 210,
MaxBatteryDischargingCurrent = 210,
MaxChargeBatteryVoltage = 57,
MinDischargeBatteryVoltage = 0,
Devices = new ()
{ {
TruConvertAcIp = new() { Host = "localhost", Port = 5001}, TruConvertAcIp = new() { Host = "localhost", Port = 5001},
TruConvertDcIp = new() { Host = "localhost", Port = 5002}, TruConvertDcIp = new() { Host = "localhost", Port = 5002},