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

修复 报警写错了,无法使 记录变为Off

parent e7841cb6
...@@ -155,15 +155,18 @@ namespace FLY.OBJComponents.Server ...@@ -155,15 +155,18 @@ namespace FLY.OBJComponents.Server
int error_id = reasonList.GetID(idx); int error_id = reasonList.GetID(idx);
error = reasonList.list[idx]; error = reasonList.list[idx];
FlyData_WarningHistory reason = new FlyData_WarningHistory();
reason.Time = DateTime.Now;
reason.ErrCode = errcode;
reason.Description = error.Description;
error.State = ERR_STATE.OFF; error.State = ERR_STATE.OFF;
reasonList.Remove(error_id); reasonList.Remove(error_id);
var newestList = NewestList as IBufferAdd<FlyData_WarningHistory>; var newestList = NewestList as IBufferAdd<FlyData_WarningHistory>;
newestList.Add(reason);
newestList.Add(new FlyData_WarningHistory
{
Time = DateTime.Now,
ErrCode = errcode,
Description = error.Description,
State = ERR_STATE.OFF
});
if (reasonList.Count > 0) if (reasonList.Count > 0)
......
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