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

修正 timegrid的time 不再是 数据包的第1个时间。 它是数据包的最个一个数据时间

parent 3444bd33
...@@ -802,8 +802,8 @@ namespace FlyADBase ...@@ -802,8 +802,8 @@ namespace FlyADBase
advPushTimeGrid(dt, data); advPushTimeGrid(dt, data);
double ts_ms = 1.28; double ts_ms = 1.28;
long ticks = (long)((ts_ms * data.Length) * TimeSpan.TicksPerMillisecond); //long ticks = (long)((ts_ms * data.Length) * TimeSpan.TicksPerMillisecond);
dt -= TimeSpan.FromTicks(ticks); //dt -= TimeSpan.FromTicks(ticks);
TimeGridEvent?.Invoke( TimeGridEvent?.Invoke(
this, this,
......
...@@ -56,7 +56,7 @@ namespace FLY.Thick.Base.Server ...@@ -56,7 +56,7 @@ namespace FLY.Thick.Base.Server
/// 1s 的AD值,就只是用来显示到主界面左上面角而已 DynArea.AD /// 1s 的AD值,就只是用来显示到主界面左上面角而已 DynArea.AD
/// </summary> /// </summary>
List<int> Data1s = new List<int>(); List<int> Data1s = new List<int>();
void flyad_TimeGridEvent(object sender, FlyADBase.TimeGridEventArgs e) void flyad_TimeGridEvent(object sender, FlyADBase.TimeGridEventArgs e)
{ {
...@@ -64,7 +64,7 @@ namespace FLY.Thick.Base.Server ...@@ -64,7 +64,7 @@ namespace FLY.Thick.Base.Server
TimeSpan ts = e.Ts; TimeSpan ts = e.Ts;
var datas = e.Data.ToArray(); var datas = e.Data.ToArray();
//1秒数据 //1秒数据, 大概而已
Data1s.AddRange(datas); Data1s.AddRange(datas);
if (TimeSpan.FromTicks(Data1s.Count * ts.Ticks) >= TimeSpan.FromSeconds(1)) if (TimeSpan.FromTicks(Data1s.Count * ts.Ticks) >= TimeSpan.FromSeconds(1))
{ {
...@@ -84,7 +84,7 @@ namespace FLY.Thick.Base.Server ...@@ -84,7 +84,7 @@ namespace FLY.Thick.Base.Server
ADs = datas, ADs = datas,
thicks = thks, thicks = thks,
time = dt, time = dt,
ts = TimeGridAdvHelperExt.ad_ts ts = ts
}; };
UpdateTime = dt; UpdateTime = dt;
} }
......
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