remove host from BmsTunnel

This commit is contained in:
ig 2023-06-20 09:29:57 +02:00
parent 5c5d2b72e5
commit 73f4b22930
1 changed files with 3 additions and 4 deletions

View File

@ -23,12 +23,12 @@ public class BmsTunnel : IDisposable
private const Byte TunnelCode = 0x41;
private const String CrcError = "?? CRC FAILED";
public BmsTunnel(String tty, Byte node, SshHost? host)
public BmsTunnel(String tty, Byte node)
{
Tty = tty;
Node = node;
StopSerialStarter(host);
StopSerialStarter();
SerialPort = new SerialPort(Tty, BaudRate, Parity, DataBits, StopBits);
SerialPort.ReadTimeout = 100;
@ -165,11 +165,10 @@ public class BmsTunnel : IDisposable
.Concat(NewLine);
}
private void StopSerialStarter(SshHost? host)
private void StopSerialStarter()
{
CliPrograms.StopTty
.WithArguments(Tty)
.OnHost(host)
.ExecuteBufferedAsync()
.Task
.Wait(3000);