Commit d25e5cbf authored by 潘栩锋's avatar 潘栩锋 🚴

1.添加 AD盒 记录重连时间点

2.修改 AD盒 10秒脉冲不动触发手动停止
parent d4e889dc
...@@ -180,8 +180,8 @@ namespace GeneralGommunication ...@@ -180,8 +180,8 @@ namespace GeneralGommunication
if (sucess) if (sucess)
{ {
sock.EndConnect(result); sock.EndConnect(result);
IsConnected = true;
ErrMsg = null; ErrMsg = null;
IsConnected = true;
return; return;
} }
else else
...@@ -241,8 +241,8 @@ namespace GeneralGommunication ...@@ -241,8 +241,8 @@ namespace GeneralGommunication
} }
//Console.WriteLine($"ReceiveTask() {e}"); //Console.WriteLine($"ReceiveTask() {e}");
//肯定断开连接了 //肯定断开连接了
IsConnected = false;
ErrMsg = e.Message; ErrMsg = e.Message;
IsConnected = false;
return; return;
} }
logger?.Debug($"tcp R len={len}"); logger?.Debug($"tcp R len={len}");
...@@ -271,16 +271,16 @@ namespace GeneralGommunication ...@@ -271,16 +271,16 @@ namespace GeneralGommunication
catch (Exception e) catch (Exception e)
{ {
//连接断开了 //连接断开了
IsConnected = false;
ErrMsg = e.Message; ErrMsg = e.Message;
IsConnected = false;
return; return;
} }
if (slen <= 0) if (slen <= 0)
{ {
//连接断开了 //连接断开了
IsConnected = false;
ErrMsg = "发送数量小于0"; ErrMsg = "发送数量小于0";
IsConnected = false;
return; return;
} }
} }
......
...@@ -384,7 +384,7 @@ namespace FlyADBase ...@@ -384,7 +384,7 @@ namespace FlyADBase
void constructor() void constructor()
{ {
Now = DateTime.Now; Now = DateTime.Now;
sysTickContext.BeReseted += () => BeResetTime = DateTime.Now; //sysTickContext.BeReseted += () => BeResetTime = DateTime.Now;
this.PropertyChanged += new PropertyChangedEventHandler(FlyAD7_PropertyChanged); this.PropertyChanged += new PropertyChangedEventHandler(FlyAD7_PropertyChanged);
...@@ -478,9 +478,9 @@ namespace FlyADBase ...@@ -478,9 +478,9 @@ namespace FlyADBase
return; return;
} }
position_no_changed_cnt++; position_no_changed_cnt++;
if (position_no_changed_cnt >= 3) if (position_no_changed_cnt >= 10)
{ {
//连续3秒,脉冲一样 //连续10秒,脉冲一样
//异常 //异常
DriveStatus = DRIVE_MAN_STATUS.STOP_MANUAL; DriveStatus = DRIVE_MAN_STATUS.STOP_MANUAL;
position_no_changed_cnt = 0; position_no_changed_cnt = 0;
...@@ -703,7 +703,7 @@ namespace FlyADBase ...@@ -703,7 +703,7 @@ namespace FlyADBase
if (IsConnected) if (IsConnected)
{ {
ConnectCnt++; ConnectCnt++;
BeResetTime = DateTime.Now;
AfterConnected(); AfterConnected();
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment