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

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

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