Use IReadOnlyList for BatteryNodes
This commit is contained in:
parent
72ced4be3e
commit
39262d1a46
|
@ -33,7 +33,7 @@ internal static class Program
|
|||
|
||||
private const UInt32 UpdateIntervalSeconds = 2;
|
||||
|
||||
private static readonly Byte[] BatteryNodes = { 2, 3, 4, 5, 6 };
|
||||
private static readonly IReadOnlyList<Byte> BatteryNodes;
|
||||
|
||||
private static readonly TcpChannel TruConvertAcChannel ;
|
||||
private static readonly TcpChannel TruConvertDcChannel ;
|
||||
|
@ -55,6 +55,12 @@ internal static class Program
|
|||
AmptChannel = new TcpChannel(d.AmptIp);
|
||||
RelaysChannel = new TcpChannel(d.RelaysIp);
|
||||
BatteriesChannel = new TcpChannel(d.BatteryIp);
|
||||
|
||||
BatteryNodes = config
|
||||
.Devices
|
||||
.BatteryNodes
|
||||
.Select(n=>n.ConvertTo<Byte>())
|
||||
.ToArray(config.Devices.BatteryNodes.Length);
|
||||
}
|
||||
|
||||
public static async Task Main(String[] args)
|
||||
|
|
Loading…
Reference in New Issue