master
lxw 1 month ago
parent 1f362c0998
commit e2bbddb92b

@ -184,6 +184,12 @@ public class LedClient
private static DateTime LastestSendTime;
private static string LastestKey=InfoEnum.SwapInfo.IDEI.GetLed();
private static byte[] Heart = new byte[]
{
0x55, 0xaa, 0x00, 0x00, 0x01,0x01, 0x00, 0xa3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0d,0x0a
};
public static bool Init(string ip, int port)
{
_ip = ip;
@ -203,9 +209,10 @@ public class LedClient
{
if (_socket?.Connected ?? false)
{
if (LastestSendTime == null )
InnerSend(Heart);
/*if (LastestSendTime == null )
{
SendMsgByKey(LastestKey);
}
@ -218,8 +225,8 @@ public class LedClient
SendMsgByKey(LastestKey);
}
}
Thread.Sleep(500);
}*/
Thread.Sleep(3000);
}
}

Loading…
Cancel
Save