Browse Source

增加乐白机器人连接标识

master
applelon 2 years ago
parent
commit
8c50e1277b
2 changed files with 4 additions and 1 deletions
  1. +2
    -0
      HBLConsole.Communication/LebaiHelper.cs
  2. +2
    -1
      HBLConsole.MORKIC/Control_MORKIC.cs

+ 2
- 0
HBLConsole.Communication/LebaiHelper.cs View File

@@ -19,6 +19,8 @@ namespace HBLConsole.Communication
private LebaiHelper() { } private LebaiHelper() { }
private LebaiRobotClient client; private LebaiRobotClient client;
private RobotData robotData; private RobotData robotData;
public bool IsConnected { get { return null != robotData; } }

public void Connect(string ip) public void Connect(string ip)
{ {
bool ErrorFlag = false; bool ErrorFlag = false;


+ 2
- 1
HBLConsole.MORKIC/Control_MORKIC.cs View File

@@ -60,7 +60,7 @@ namespace HBLConsole.MORKIC
/// <summary> /// <summary>
/// 获取乐百机器人的数据 /// 获取乐百机器人的数据
/// </summary> /// </summary>
SignalResult lebai=new SignalResult();
SignalResult lebai = new SignalResult();


public void ConnectOk() public void ConnectOk()
{ {
@@ -246,6 +246,7 @@ namespace HBLConsole.MORKIC
{ {
//GeneralConfig.Healthy = true; //GeneralConfig.Healthy = true;
GeneralConfig.Healthy = GeneralConfig.Healthy =
LebaiHelper.GetInstance.IsConnected &&
MorkIStatus.GetInstance().CanDo && MorkIStatus.GetInstance().CanDo &&
MorkCStatus.GetInstance().CanDo; MorkCStatus.GetInstance().CanDo;
Thread.Sleep(100); Thread.Sleep(100);


Loading…
Cancel
Save