From 426c4474838f907e933646794a34519f189084b4 Mon Sep 17 00:00:00 2001 From: ig Date: Thu, 23 Feb 2023 16:14:11 +0100 Subject: [PATCH] make BmsTunnel buildable, it's still broken --- csharp/app/BmsTunnel/Program.cs | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/csharp/app/BmsTunnel/Program.cs b/csharp/app/BmsTunnel/Program.cs index d39e2aecf..5f2d42de7 100644 --- a/csharp/app/BmsTunnel/Program.cs +++ b/csharp/app/BmsTunnel/Program.cs @@ -2,7 +2,6 @@ // rsync -av bin/Release/net6.0/linux-arm/publish/ root@10.2.1.6:/home/root/tunnel && clear && \ // ssh root@10.2.1.6 /home/root/tunnel/BmsTunnel -using System.Net; using InnovEnergy.Lib.Utils; using static System.String; @@ -21,13 +20,21 @@ public static class Program Console.WriteLine("\nstarting BMS tunnel\n"); - var path = $"/dev/{tty}"; - if (host != null) - path = $"root@{host}" + path; + // var path = $"/dev/{tty}"; + // if (host != null) + // path = $"root@{host}" + path; + // + // var node = connection.Nodes.Any() + // ? connection.Nodes.First() + // : DefaultNode; + // - var node = connection.Nodes.Any() - ? connection.Nodes.First() - : DefaultNode; + // TODO: Fixme + var path = ""; + Byte node = 2; + var nodes = new Byte[] { 1, 2, 3 }; + + // TODO: Fixme using var tunnel = new BmsTunnel(path, node); @@ -82,7 +89,7 @@ public static class Program void ListNodes() { - if(nodes.Count >= 250) + if(nodes.Length >= 250) return; nodes.Aggregate("available nodes:", (a, b) => $"{a} {b}")