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

修改 flyad7 的 timegrid 里面的时间为最后一个数据的时间。与AD盒逻辑一致

parent c4205399
...@@ -913,6 +913,8 @@ namespace FLY.Simulation.Flyad7 ...@@ -913,6 +913,8 @@ namespace FLY.Simulation.Flyad7
} }
} }
public int HardwareVersion { get; set; } = 2;
struct SyncPos2Item struct SyncPos2Item
{ {
public bool At01;//? or At10 public bool At01;//? or At10
......
...@@ -376,6 +376,8 @@ namespace FlyADBase ...@@ -376,6 +376,8 @@ namespace FlyADBase
calSpeed.Reset(); calSpeed.Reset();
Init2(); Init2();
lastTimeGridTime = DateTime.MinValue;
} }
#region FObj #region FObj
...@@ -801,15 +803,16 @@ namespace FlyADBase ...@@ -801,15 +803,16 @@ namespace FlyADBase
data = pack.data; data = pack.data;
advPushTimeGrid(dt, data); advPushTimeGrid(dt, data);
double ts_ms = 1.28; TimeSpan ts = TimeSpan.FromTicks((long)(1.28 * TimeSpan.TicksPerMillisecond));
//long ticks = (long)((ts_ms * data.Length) * TimeSpan.TicksPerMillisecond); if (lastTimeGridTime != DateTime.MinValue)
//dt -= TimeSpan.FromTicks(ticks); ts = TimeSpan.FromTicks((dt - lastTimeGridTime).Ticks / data.Length);
lastTimeGridTime = dt;
TimeGridEvent?.Invoke( TimeGridEvent?.Invoke(
this, this,
new TimeGridEventArgs( new TimeGridEventArgs(
dt, dt,
TimeSpan.FromTicks((long)(ts_ms * TimeSpan.TicksPerMillisecond)), ts,
data)); data));
} }
break; break;
...@@ -1343,7 +1346,7 @@ namespace FlyADBase ...@@ -1343,7 +1346,7 @@ namespace FlyADBase
/// ad值不会被机架修正 /// ad值不会被机架修正
/// </summary> /// </summary>
public event TimeGridEventHandler TimeGridEvent; public event TimeGridEventHandler TimeGridEvent;
DateTime lastTimeGridTime;
/// <summary> /// <summary>
......
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