Commit 889ec296 authored by 潘栩锋's avatar 潘栩锋 🚴

1.新增 flyad7 新增TimeGridAdvEvent, 是 timegrid 的加强版,带有位置信息

2.删除 flyad7 删除GridAdvEvent,因为完全没有用过
parent 9cf318c6
...@@ -22,22 +22,12 @@ namespace FLY.Simulation.Blowing ...@@ -22,22 +22,12 @@ namespace FLY.Simulation.Blowing
/// </summary> /// </summary>
public double AngleRange; public double AngleRange;
private double anglevelocity;
/// <summary> /// <summary>
/// 旋转的速度, min/R 1R = 360° /// 旋转的速度, min/R 1R = 360°
/// </summary> /// </summary>
public double AngleVelocity public double AngleVelocity { get; set; }
{
get { return anglevelocity; }
set
{
if (anglevelocity != value)
{
anglevelocity = value;
NotifyPropertyChanged("AngleVelocity");
}
}
}
/// <summary> /// <summary>
/// 加速时间 单位 s /// 加速时间 单位 s
...@@ -59,40 +49,18 @@ namespace FLY.Simulation.Blowing ...@@ -59,40 +49,18 @@ namespace FLY.Simulation.Blowing
/// <summary> /// <summary>
/// 膜泡压扁后总宽度,单位m /// 膜泡压扁后总宽度,单位m
/// </summary> /// </summary>
public double FilmWidth public double FilmWidth { get; set; }
{
get { return filmwidth; }
set
{
if (filmwidth != value)
{
filmwidth = value;
NotifyPropertyChanged("FilmWidth");
}
}
}
private double filmvelocity;
/// <summary> /// <summary>
/// 膜走带速度, m/min /// 膜走带速度, m/min
/// </summary> /// </summary>
public double FilmVelocity public double FilmVelocity { get; set; }
{
get { return filmvelocity; }
set
{
if (filmvelocity != value)
{
filmvelocity = value;
NotifyPropertyChanged("FilmVelocity");
}
}
}
/// <summary> /// <summary>
/// 人字架到测厚仪的距离 23m /// 人字架到测厚仪的距离 23m
...@@ -128,38 +96,16 @@ namespace FLY.Simulation.Blowing ...@@ -128,38 +96,16 @@ namespace FLY.Simulation.Blowing
///// </summary> ///// </summary>
//public int Factor;// //public int Factor;//
//#endregion //#endregion
private bool isShieldI9 = false;
public bool IsShieldI9 public bool IsShieldI9 { get; set; }
{
get { return isShieldI9; }
set {
if (isShieldI9 != value)
{
isShieldI9 = value;
NotifyPropertyChanged("IsShieldI9");
}
}
}
#endregion #endregion
#region 动态数据 #region 动态数据
private double currangle;
/// <summary> /// <summary>
/// 当前人字架角度 ° /// 当前人字架角度 °
/// </summary> /// </summary>
public double CurrAngle public double CurrAngle { get; set; }
{
get { return currangle; }
set
{
if (currangle != value)
{
currangle = value;
NotifyPropertyChanged("CurrAngle");
}
}
}
/// <summary> /// <summary>
/// 当前速度,单位 °/s /// 当前速度,单位 °/s
/// </summary> /// </summary>
...@@ -178,17 +124,7 @@ namespace FLY.Simulation.Blowing ...@@ -178,17 +124,7 @@ namespace FLY.Simulation.Blowing
#endregion #endregion
public HMI mHMI; public HMI mHMI;
private int avg; private int avg;
public int Avg public int Avg { get; set; }
{
get { return avg; }
set {
if (avg != value)
{
avg = value;
NotifyPropertyChanged("Avg");
}
}
}
/// <summary> /// <summary>
/// 原始数据 /// 原始数据
/// </summary> /// </summary>
...@@ -276,30 +212,10 @@ namespace FLY.Simulation.Blowing ...@@ -276,30 +212,10 @@ namespace FLY.Simulation.Blowing
} }
private int test_pos; public int TestPos { get; set; }
public int TestPos
{ public int TestHeat { get; set; }
get { return test_pos; }
set {
if (test_pos != value)
{
test_pos = value;
NotifyPropertyChanged("TestPos");
}
}
}
private int test_thick;
public int TestHeat
{
get { return test_thick; }
set {
if (test_thick != value)
{
test_thick = value;
NotifyPropertyChanged("TestHeat");
}
}
}
public void Test() public void Test()
{ {
int idx = mAirRing.ChannelCnt * TestPos / BeforeDatas.Count(); int idx = mAirRing.ChannelCnt * TestPos / BeforeDatas.Count();
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
...@@ -10,8 +10,9 @@ ...@@ -10,8 +10,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FLY.Simulation.Blowing</RootNamespace> <RootNamespace>FLY.Simulation.Blowing</RootNamespace>
<AssemblyName>FLY.Simulation.Blowing</AssemblyName> <AssemblyName>FLY.Simulation.Blowing</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
...@@ -21,6 +22,7 @@ ...@@ -21,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
...@@ -29,6 +31,7 @@ ...@@ -29,6 +31,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
...@@ -64,6 +67,11 @@ ...@@ -64,6 +67,11 @@
<Name>FLY.Simulation</Name> <Name>FLY.Simulation</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="PropertyChanged.Fody">
<Version>2.6.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
......
<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged />
</Weavers>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EventInvokerNames" type="xs:string">
<xs:annotation>
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEquality" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
...@@ -10,8 +10,9 @@ ...@@ -10,8 +10,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FLY.Simulation.Casting</RootNamespace> <RootNamespace>FLY.Simulation.Casting</RootNamespace>
<AssemblyName>FLY.Simulation.Casting</AssemblyName> <AssemblyName>FLY.Simulation.Casting</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
...@@ -21,6 +22,7 @@ ...@@ -21,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
...@@ -29,6 +31,7 @@ ...@@ -29,6 +31,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
...@@ -10,8 +10,9 @@ ...@@ -10,8 +10,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FLY.Simulation.Coating</RootNamespace> <RootNamespace>FLY.Simulation.Coating</RootNamespace>
<AssemblyName>FLY.Simulation.Coating</AssemblyName> <AssemblyName>FLY.Simulation.Coating</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
...@@ -21,6 +22,7 @@ ...@@ -21,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
...@@ -29,6 +31,7 @@ ...@@ -29,6 +31,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
...@@ -10,8 +10,9 @@ ...@@ -10,8 +10,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FLY.Simulation.Flyad7</RootNamespace> <RootNamespace>FLY.Simulation.Flyad7</RootNamespace>
<AssemblyName>FLY.Simulation.Flyad7</AssemblyName> <AssemblyName>FLY.Simulation.Flyad7</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
...@@ -21,6 +22,7 @@ ...@@ -21,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
...@@ -29,6 +31,7 @@ ...@@ -29,6 +31,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
...@@ -10,8 +10,9 @@ ...@@ -10,8 +10,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FLY.Simulation.HeaderAndTailer</RootNamespace> <RootNamespace>FLY.Simulation.HeaderAndTailer</RootNamespace>
<AssemblyName>FLY.Simulation.HeaderAndTailer</AssemblyName> <AssemblyName>FLY.Simulation.HeaderAndTailer</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
...@@ -21,6 +22,7 @@ ...@@ -21,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
...@@ -29,6 +31,7 @@ ...@@ -29,6 +31,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
...@@ -10,8 +10,9 @@ ...@@ -10,8 +10,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FLY.Simulation</RootNamespace> <RootNamespace>FLY.Simulation</RootNamespace>
<AssemblyName>FLY.Simulation</AssemblyName> <AssemblyName>FLY.Simulation</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
...@@ -21,6 +22,7 @@ ...@@ -21,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
...@@ -29,6 +31,7 @@ ...@@ -29,6 +31,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
......
This diff is collapsed.
...@@ -48,7 +48,10 @@ ...@@ -48,7 +48,10 @@
<Compile Include="FlyAD7.cs" /> <Compile Include="FlyAD7.cs" />
<Compile Include="FLYAD7_OBJ_INTERFACE.cs" /> <Compile Include="FLYAD7_OBJ_INTERFACE.cs" />
<Compile Include="IFlyAD.cs" /> <Compile Include="IFlyAD.cs" />
<Compile Include="IFlyADClient.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SyncOrder.cs" />
<Compile Include="TimeGridAdvHelper.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\Project.FLY.FObjSys\FObjSys\FObjBase.csproj"> <ProjectReference Include="..\..\Project.FLY.FObjSys\FObjSys\FObjBase.csproj">
...@@ -60,6 +63,11 @@ ...@@ -60,6 +63,11 @@
<Name>Misc</Name> <Name>Misc</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="PropertyChanged.Fody">
<Version>2.6.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
......
<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged />
</Weavers>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EventInvokerNames" type="xs:string">
<xs:annotation>
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEquality" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
\ No newline at end of file
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace FlyADBase
{
/// <summary>
/// 客户端的 flyad
/// </summary>
public interface IFlyADClient : IFlyAD
{
/// <summary>
/// 连接成功
/// </summary>
bool IsConnected { get; }
/// <summary>
/// 重连次数
/// </summary>
int ConnectCnt { get; }
/// <summary>
/// 机架修正
/// </summary>
CorrectADsHandler CorrectADs { get; set; }
/// <summary>
/// CRC 校正
/// </summary>
bool HasCRC { get; set; }
/// <summary>
/// grid 滤波
/// </summary>
int GridSmooth { get; set; }
/// <summary>
/// Ratio02 / Ratio01
/// </summary>
double Speed1Scale { get; }
/// <summary>
/// 连接
/// </summary>
void Connect();
/// <summary>
/// 连接 ep
/// </summary>
/// <param name="ep"></param>
void Connect(IPEndPoint ep);
/// <summary>
/// 重连
/// </summary>
void ReConnect();
/// <summary>
/// 机架总长
/// </summary>
int PosLen { get; set; }
/// <summary>
/// Runto(0), 不同于 Backward
/// </summary>
void RuntoMin();
/// <summary>
/// Runto(PosLen), 不同于 Forward
/// </summary>
void RuntoMax();
/// <summary>
/// 用于同步, 最后一次 纵向信号 0->1 时,主轴脉冲
/// </summary>
int LastPos2At01 { get; }
/// <summary>
/// 当前在同步状态
/// </summary>
bool IsSync { get; }
/// <summary>
/// 设置输出
/// </summary>
/// <param name="index"></param>
/// <param name="is1"></param>
void SetOutputBit(int index, bool is1);
#region 滞后处理
/// <summary>
/// ad滞后修正 单位ms
/// </summary>
int ADLag { get; set; }
/// <summary>
/// 以timegrid 为单位,推送数据
/// </summary>
event TimeGridAdvEventHandler TimeGridAdvEvent;
#endregion
#region runto 推送 istatus 变化
/// <summary>
/// 获取一整幅 grid 对应的 输入口状态 数据
/// </summary>
/// <param name="istatus_no"></param>
/// <param name="func"></param>
void GridIStatusEventAdd(int istatus_no, GridIStatusEventHander func);
void GridIStatusEventDel(int istatus_no, GridIStatusEventHander func);
#endregion
#region 同步
/// <summary>
/// 同步列表,完成后,会删除
/// </summary>
ObservableCollection<SyncOrder> SyncOrders { get; }
#endregion
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FlyADBase
{
public enum SyncOrderState
{
Waiting,
Doing,
Finish
}
public abstract class SyncOrder : INotifyPropertyChanged
{
public SyncOrderState State { get; set; } = SyncOrderState.Waiting;
public Int32 Marker { get; set; }
public event PropertyChangedEventHandler PropertyChanged;
}
public class SyncOrder_SyncRunAtLC : SyncOrder
{
public int Pos2Begin { get; set; }
public int Pos2End { get; set; }
public int Pos1LC { get; set; }
public bool HasDataGrid { get; set; }
public override string ToString()
{
string s;
if (State == SyncOrderState.Waiting)
s = "_ ";
else if (State == SyncOrderState.Doing)
s = "√ ";
else// if (State == SyncOrderState.Finish)
s = "x ";
return s + "SyncRunAtLC( " +
"Pos2Begin=" + Pos2Begin.ToString() + ", " +
"Pos2End=" + Pos2End.ToString() + ", " +
"Pos1LC=" + Pos1LC.ToString() + ", " +
"HasDataGrid=" + HasDataGrid.ToString() + ", " +
"Marker=" + Marker.ToString() + ")";
}
}
public class SyncOrder_SyncOrigin : SyncOrder
{
public override string ToString()
{
string s;
if (State == SyncOrderState.Waiting)
s = "_ ";
else if (State == SyncOrderState.Doing)
s = "√ ";
else// if (State == SyncOrderState.Finish)
s = "x ";
return s + "SyncOrigin( " +
"Marker=" + Marker.ToString() + ")";
}
}
public class SyncOrder_SyncRunTo : SyncOrder
{
public int Pos1 { get; set; }
public UInt32 Velocity { get; set; }
public bool HasDataGrid { get; set; }
public override string ToString()
{
string s;
if (State == SyncOrderState.Waiting)
s = "_ ";
else if (State == SyncOrderState.Doing)
s = "√ ";
else// if (State == SyncOrderState.Finish)
s = "x ";
return s + "SyncRunTo( " +
"Pos1=" + Pos1.ToString() + ", " +
"Velocity=" + Velocity.ToString() + ", " +
"HasDataGrid=" + HasDataGrid.ToString() + ", " +
"Marker=" + Marker.ToString() + ")";
}
}
public class SyncOrder_SyncRunToLC : SyncOrder
{
public int Pos1 { get; set; }
public UInt32 Velocity { get; set; }
public bool HasDataGrid { get; set; }
public override string ToString()
{
string s;
if (State == SyncOrderState.Waiting)
s = "_ ";
else if (State == SyncOrderState.Doing)
s = "√ ";
else// if (State == SyncOrderState.Finish)
s = "x ";
return s + "SyncRunToLC( " +
"Pos1=" + Pos1.ToString() + ", " +
"Velocity=" + Velocity.ToString() + ", " +
"HasDataGrid=" + HasDataGrid.ToString() + ", " +
"Marker=" + Marker.ToString() + ")";
}
}
public class SyncOrder_SyncWait : SyncOrder
{
public int MS { get; set; }
public override string ToString()
{
string s;
if (State == SyncOrderState.Waiting)
s = "_ ";
else if (State == SyncOrderState.Doing)
s = "√ ";
else// if (State == SyncOrderState.Finish)
s = "x ";
return s + "SyncWait( " +
"MS=" + MS.ToString() + ", " +
"Marker=" + Marker.ToString() + ")";
}
}
public static class SyncOrderExtention
{
public static void Add(this SyncOrder order, IFlyAD flyad)
{
if (order is SyncOrder_SyncRunAtLC)
{
((SyncOrder_SyncRunAtLC)order).Add(flyad);
}
else if (order is SyncOrder_SyncOrigin)
{
((SyncOrder_SyncOrigin)order).Add(flyad);
}
else if (order is SyncOrder_SyncRunTo)
{
((SyncOrder_SyncRunTo)order).Add(flyad);
}
else if (order is SyncOrder_SyncRunToLC)
{
((SyncOrder_SyncRunToLC)order).Add(flyad);
}
else if (order is SyncOrder_SyncWait)
{
((SyncOrder_SyncWait)order).Add(flyad);
}
}
public static void Add(this SyncOrder_SyncRunAtLC order, IFlyAD flyad)
{
flyad.SyncRunAtLC(order.Pos2Begin, order.Pos2End, order.Pos1LC, order.HasDataGrid, order.Marker);
}
public static void Add(this SyncOrder_SyncOrigin order, IFlyAD flyad)
{
flyad.SyncOrigin(order.Marker);
}
public static void Add(this SyncOrder_SyncRunTo order, IFlyAD flyad)
{
flyad.SyncRunTo(
order.Pos1, order.Velocity, order.HasDataGrid, order.Marker);
}
public static void Add(this SyncOrder_SyncRunToLC order, IFlyAD flyad)
{
flyad.SyncRunToLC(
order.Pos1, order.Velocity, order.HasDataGrid, order.Marker);
}
public static void Add(this SyncOrder_SyncWait order, IFlyAD flyad)
{
flyad.SyncWait(order.MS, order.Marker);
}
}
}
This diff is collapsed.
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Flyad7_WPF</RootNamespace> <RootNamespace>Flyad7_WPF</RootNamespace>
<AssemblyName>Flyad7_WPF</AssemblyName> <AssemblyName>Flyad7_WPF</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
......
...@@ -60,9 +60,10 @@ namespace Flyad7_WPF ...@@ -60,9 +60,10 @@ namespace Flyad7_WPF
this.groupBox_fb.DataContext = autofb; this.groupBox_fb.DataContext = autofb;
this.groupBox_adpos.DataContext = flyad_clientui; this.groupBox_adpos.DataContext = flyad_clientui;
flyad.GridEvent += new MiniGridEventHandler(flyad_GridEvent); flyad.GridEvent += flyad_GridEvent;
flyad.TimeGridEvent += new TimeGridEventHandler(flyad_TimeGridEvent); flyad.TimeGridEvent += flyad_TimeGridEvent;
flyad.GridAdvEvent += Flyad_GridAdvEvent; flyad.TimeGridAdvEvent += flyad_TimeGridAdvEvent;
flyad.PropertyChanged += (s, e) => flyad.PropertyChanged += (s, e) =>
{ {
if (e.PropertyName == "OStatus") if (e.PropertyName == "OStatus")
...@@ -99,73 +100,39 @@ namespace Flyad7_WPF ...@@ -99,73 +100,39 @@ namespace Flyad7_WPF
//t.Start(); //t.Start();
} }
private void Flyad_GridAdvEvent(object sender, GridAdvEventArgs e)
{
if (param.HasGridAdv)
{
private void flyad_TimeGridAdvEvent(object sender, TimeGridAdvEventArgs e)
{
Series series_pos = chart3.Series[0]; Series series_pos = chart3.Series[0];
Series series_ad = chart3.Series[1]; Series series_ad = chart3.Series[1];
series_pos.Points.Clear();
series_ad.Points.Clear();
for (int i = 0; i < e.dt_data.Count(); i++) while (series_pos.Points.Count() > 5000)
{
series_pos.Points.RemoveAt(0);
}
while (series_ad.Points.Count() > 5000)
{ {
int pos = e.dt_data[i].pos; series_ad.Points.RemoveAt(0);
int ad = e.dt_data[i].ad; }
DateTime dt = e.dt_data[i].dt;
foreach (var data in e.Data)
{
int pos = data.pos;
int ad = data.ad;
DateTime dt = data.dt;
series_pos.Points.AddY(pos); series_pos.Points.AddY(pos);
DataPoint p = series_pos.Points.Last(); DataPoint p = series_pos.Points.Last();
p.AxisLabel = dt.ToString("ss.ff"); p.AxisLabel = $"{dt:ss.ff}";
series_ad.Points.AddY(ad); series_ad.Points.AddY(ad);
p = series_ad.Points.Last(); p = series_ad.Points.Last();
p.AxisLabel = dt.ToString("ss.ff"); p.AxisLabel = $"{dt:ss.ff}";
} }
chart3.ChartAreas[0].AxisX.Minimum = 0; chart3.ChartAreas[0].AxisX.Minimum = 0;
chart3.ChartAreas[0].AxisX.Maximum = e.dt_data.Count(); chart3.ChartAreas[0].AxisX.Maximum = e.Data.Count();
if (!param.HasGrid)
{
GridAdvUnit[] pos_data = FlyAD7.TimeUnit2PosUnit(e.direction, e.pos_start, e.pos_len, e.dt_data);
run_gridmarker.Text = e.marker.ToString();
System.Windows.Forms.DataVisualization.Charting.Series series_forw = chart1.Series["Series 1"];
System.Windows.Forms.DataVisualization.Charting.Series series_backw = chart1.Series["Series 2"];
System.Windows.Forms.DataVisualization.Charting.Series series;
if (e.direction == DIRECTION.FORWARD)
{
series = series_forw;
}
else
{
series = series_backw;
}
series.Points.Clear();
for (int i = 0; i < pos_data.Length; i++)
{
if (pos_data[i] != null)
{
int pos = pos_data[i].pos;
int ad = pos_data[i].ad;
series.Points.AddXY(pos, ad);
if (ad == Misc.MyBase.NULL_VALUE)
series.Points.Last().IsEmpty = true;
}
}
chart1.ChartAreas[0].AxisX.Minimum = 0;
chart1.ChartAreas[0].AxisX.Maximum = flyad.PosLen;
}
}
} }
/// <summary> /// <summary>
......
<?xml version="1.0"?> <?xml version="1.0"?>
<configuration> <configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
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