Commit 0ca8cbdc authored by 潘栩锋's avatar 潘栩锋 🚴

修改 WanringSystem 让它支持 FLYAD7 的报警灯

parent 7afe58f7
...@@ -45,8 +45,14 @@ namespace FLY.OBJComponents.Server ...@@ -45,8 +45,14 @@ namespace FLY.OBJComponents.Server
public Action ResetEvent; public Action ResetEvent;
public void Reset() public void Reset()
{ {
ReasonList.Reset();
ResetEvent?.Invoke(); ResetEvent?.Invoke();
} }
/// <summary>
/// 正在报警
/// </summary>
public Action RingEvent;
#region IWarningServiceSimple #region IWarningServiceSimple
...@@ -101,6 +107,14 @@ namespace FLY.OBJComponents.Server ...@@ -101,6 +107,14 @@ namespace FLY.OBJComponents.Server
break; break;
} }
((Buffer<FlyData_WarningHistory>)NewestList).Add(reason); ((Buffer<FlyData_WarningHistory>)NewestList).Add(reason);
if (reasonList.Count > 0)
{
RingEvent?.Invoke();
}
else
{
Reset();
}
} }
#endregion #endregion
......
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