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

基本完成 FlyAd2021 还有线程问题还没考虑

parent c5ae9e85
......@@ -872,6 +872,12 @@ namespace FLY.Simulation.Flyad7
}
}
}
/// <summary>
/// 逻辑横向脉冲偏移 Pos1 + Pos1LCShift = Pos1LC
/// </summary>
public int Pos2LCShift { get; set; }
private int position2;
/// <summary>
/// 纵向脉冲,也叫主轴脉冲
......
This diff is collapsed.
......@@ -55,16 +55,15 @@ namespace FlyADBase
DateTime BeResetTime { get; }
/// <summary>
/// 用于同步, 最后一次 纵向信号 0->1 时,主轴脉冲
/// 当前在同步状态
/// </summary>
[Obsolete("偏移都由电脑计算,不需要AD盒处理")]
int LastPos2At01 { get; }
bool IsSync { get; }
/// <summary>
/// 当前在同步状态
/// 只要connect成功,获取systick被复位,都会从AD盒设备读取参数;
/// 否则, 设置参数 到 AD盒
/// </summary>
bool IsSync { get; }
bool IsReadParamFromDev { get; set; }
/// <summary>
/// 同步列表,完成后,会删除
......
......@@ -16,12 +16,6 @@ namespace FlyADBase
/// </summary>
public interface IFlyADClientAdv : IFlyADClient
{
/// <summary>
/// 通过脉冲计算速度,不使用AD盒的输出
/// </summary>
bool IsCalSpeed { get; set; }
/// <summary>
/// 机架修正
/// </summary>
......@@ -37,12 +31,6 @@ namespace FlyADBase
/// </summary>
double Speed1Scale { get; }
/// <summary>
/// 只要connect成功,获取systick被复位,都会从AD盒设备读取参数;
/// 否则, 设置参数 到 AD盒
/// </summary>
bool IsReadParamFromDev { get; set; }
/// <summary>
/// 机架总长
/// </summary>
......@@ -101,17 +89,32 @@ namespace FlyADBase
/// </summary>
bool IsFinish { get; }
#region 滞后处理
/// <summary>
/// ad滞后修正 单位ms
/// </summary>
int ADLag { get; set; }
//一共有1.AD数据池(由timegrid提供) 1min
//2.pos数据池(pos推送提供) 1min
//4.当接收的grid事件数据。它有 (direction, grid_start,grid_len, systick )
//systick 就是结束的时间点。 当AD数据池出现了这个时间点
//pos数据池向前找。 pos 在 grid_start*posOfGrid 范围的数据。
//找到开始的systick 后,整合3个数据池的数据。
//5.最后代替 grid 推送出去。
TimeGridAdvHelper mTimeGridAdvHelper { get; }
/// <summary>
/// 动作指令完成,准备推送 timegridadv 事件
/// </summary>
bool IsTimeToPushTimeGridAdv { get; }
/// <summary>
/// 以timegrid 为单位,推送数据
/// </summary>
event TimeGridAdv2EventHandler TimeGridAdv2Event;
#endregion
}
/// <summary>
......
......@@ -42,6 +42,7 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="FlyAd2021Adv.cs" />
<Compile Include="FlyAd2021Comm_SerialPort.cs" />
<Compile Include="FlyAd2021Core.cs" />
<Compile Include="FlyAd2021.cs" />
......@@ -52,6 +53,10 @@
<Compile Include="ProtocolCommon.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Project.FLY.FObjSys\FObjSys\FObjBase.csproj">
<Project>{ABFE87D4-B692-4AE9-A8C0-1F470B8ACBB8}</Project>
<Name>FObjBase</Name>
</ProjectReference>
<ProjectReference Include="..\..\Project.FLY.Misc\MISC\Misc.csproj">
<Project>{5ee61ac6-5269-4f0f-b8fa-4334fe4a678f}</Project>
<Name>Misc</Name>
......@@ -62,6 +67,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoMapper">
<Version>10.1.1</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version>
</PackageReference>
......
This diff is collapsed.
......@@ -91,6 +91,7 @@ namespace FlyAd2021
COMMREQ COMMREQ_RN;
public FlyAd2021Core()
{
//COMMREQ_RN 作为事件,会触发一次,作为指令,也会回复一次
COMMREQ_RN = new COMMREQ(COMMREQ_Type.RN, 5, (pack, dataIdx) =>
{
DRIVE_MAN_STATUS result = (DRIVE_MAN_STATUS)pack[dataIdx];
......
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