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

小修改

parent 5d83800f
......@@ -29,5 +29,5 @@ namespace FObjBase
}
}
public delegate void AsyncCBHandler(object AsyncState, object retData);
public delegate void AsyncCBHandler(object asyncContext, object retData);
}
......@@ -18,11 +18,12 @@ namespace FlyADBase
{
}
/// <summary>
///
/// </summary>
public int Marker { get; set; }
public Misc.DIRECTION Direction { get; set; }
/// <summary>
/// 数据
/// </summary>
......
......@@ -429,7 +429,12 @@ namespace FlyADBase
gridAdvUnit.ad = CorrectAD(gridAdvUnit.pos / PosOfGrid, gridAdvUnit.ad);
}
}
TimeGridAdvEvent(this, new TimeGridAdvEventArgs() { Data = gridAdvUnits, Marker = pushGridInfo.marker });
TimeGridAdvEvent(this,
new TimeGridAdvEventArgs() {
Data = gridAdvUnits,
Marker = pushGridInfo.marker,
Direction = pushGridInfo.direction
});
}
pushGridInfo = null;
......
......@@ -117,6 +117,7 @@ namespace FlyADBase
/// <param name="grid_len">grid 长度</param>
/// <param name="dat">grid 数据</param>
void GetGrid(DIRECTION direction, int grid_start, int grid_len, out int[] dat);
/// <summary>
/// 从正反缓存区, 获取全部grid数据
/// </summary>
......@@ -132,6 +133,7 @@ namespace FlyADBase
/// <param name="dat"></param>
/// <param name="adLag">测试功能 ad值滞后</param>
void ToGrid(IEnumerable<GridAdvUnit> gridAdvUnits, out int[] dat,int adLag);
/// <summary>
/// 动作完成
/// </summary>
......
......@@ -12,5 +12,9 @@ namespace Flyad7_WPF
/// </summary>
public partial class App : Application
{
public App()
{
App.Current.Properties["Container"] = UnityExt.Container;
}
}
}
......@@ -44,25 +44,25 @@ namespace Flyad7_WPF
public RelayCommand StartCmd { get; private set; }
public RelayCommand StopCmd { get; private set; }
public RelayCommand AnalyzeCmd { get; private set; }
List<IEnumerable<GridAdvUnit>> gridAdvUnits = new List<IEnumerable<GridAdvUnit>>();
public AutoGetGridAdv()
public AutoGetGridAdv(FlyAD7 flyad)
{
this.flyad = flyad;
StartCmd = new RelayCommand(Start);
StopCmd = new RelayCommand(Stop);
AnalyzeCmd = new RelayCommand(Analyze);
Load();
}
public void Init(FlyAD7 flyad)
{
this.PropertyChanged += AutoSave;
this.flyad = flyad;
}
CancellationTokenSource cancellationTokenSource;
public async void Start()
async void Start()
{
if (IsRunning)
......@@ -159,7 +159,7 @@ namespace Flyad7_WPF
}
}
}
public void Stop()
void Stop()
{
if (!IsRunning)
return;
......@@ -170,8 +170,13 @@ namespace Flyad7_WPF
cancellationTokenSource.Cancel();
}
private void Analyze()
{
WdGridAdvAnalyze wd = new WdGridAdvAnalyze();
wd.Init();
wd.ShowDialog();
}
public event PropertyChangedEventHandler PropertyChanged;
private bool isIgnoreSave;
......@@ -196,7 +201,7 @@ namespace Flyad7_WPF
{
try
{
string json = Newtonsoft.Json.JsonConvert.SerializeObject(this);
string json = Newtonsoft.Json.JsonConvert.SerializeObject(this, Formatting.Indented);
File.WriteAllText("autoGridAdv.json", json);
}
catch (Exception e )
......
......@@ -124,7 +124,7 @@ namespace Flyad7_WPF
public double FilmVelocity { get; set; }
public AutoSync()
public AutoSync(FlyAD7 flyad)
{
ScanBegin = 484;
ScanWidth = 4000;
......@@ -150,11 +150,11 @@ namespace Flyad7_WPF
ConsumeOfGrid = 3;
Load();
Init(flyad);
}
public void Init(IFlyADClient flyad)
void Init(IFlyADClient flyad)
{
mFlyAD = flyad;
Misc.BindingOperations.SetBinding(mFlyAD, new string[] { "Ratio02", "Ratio01" },
......
......@@ -48,9 +48,6 @@ namespace Flyad7_WPF
public DebugAppParam()
{
Load();
}
public void Init()
{
this.PropertyChanged += AutoSave;
}
......@@ -60,7 +57,7 @@ namespace Flyad7_WPF
if (isIgnoreSave)
return;
if (this.GetType().GetProperty(e.PropertyName).GetCustomAttributes(typeof(JsonPropertyAttribute), false).Count() > 0)
//if (this.GetType().GetProperty(e.PropertyName).GetCustomAttributes(typeof(JsonPropertyAttribute), false).Count() > 0)
{
isIgnoreSave = true;
await Task.Delay(5000);//Task.Yield();
......@@ -72,7 +69,7 @@ namespace Flyad7_WPF
{
try
{
string json = JsonConvert.SerializeObject(this);
string json = JsonConvert.SerializeObject(this, Formatting.Indented);
File.WriteAllText("param.json", json);
}
catch {
......
......@@ -80,6 +80,15 @@
<Compile Include="DebugAppParam.cs" />
<Compile Include="FlyADClientUI.cs" />
<Compile Include="GridAdvVm.cs" />
<Compile Include="UnityExt.cs" />
<Compile Include="WdConvolution\WdConvolution.xaml.cs">
<DependentUpon>WdConvolution.xaml</DependentUpon>
</Compile>
<Compile Include="WdConvolution\WdConvolutionVm.cs" />
<Compile Include="WdGridAdvAnalyze\WdGridAdvAnalyzeVm.cs" />
<Compile Include="WdGridAdvAnalyze\WdGridAdvAnalyze.xaml.cs">
<DependentUpon>WdGridAdvAnalyze.xaml</DependentUpon>
</Compile>
<Compile Include="Window1.xaml.cs">
<DependentUpon>Window1.xaml</DependentUpon>
</Compile>
......@@ -111,6 +120,22 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="WdConvolution\WdConvolution.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="WdConvolution\WdConvolutionStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="WdGridAdvAnalyze\WdGridAdvAnalyze.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="WdGridAdvAnalyze\WdGridAdvAnalyzeStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Window1.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
......@@ -175,9 +200,6 @@
<Resource Include="chip_128px_1093586_easyicon.net.ico" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoMapper">
<Version>9.0.0</Version>
</PackageReference>
<PackageReference Include="Costura.Fody">
<Version>3.3.3</Version>
</PackageReference>
......@@ -186,6 +208,9 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="MathNet.Numerics">
<Version>4.9.0</Version>
</PackageReference>
<PackageReference Include="MvvmLightLibs">
<Version>5.4.1.1</Version>
</PackageReference>
......@@ -195,6 +220,12 @@
<PackageReference Include="PropertyChanged.Fody">
<Version>2.6.1</Version>
</PackageReference>
<PackageReference Include="Unity">
<Version>5.11.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Core\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
......
......@@ -22,112 +22,32 @@ namespace Flyad7_WPF
public RelayCommand LoadCmd { get; private set; }
public RelayCommand CalAdLagCmd { get; private set; }
Chart chart3;
Chart chart3 = null;
FlyAD7 flyad;
int timeGridAdvIndex = 0;
List<IEnumerable<GridAdvUnit>> gridAdvUnits = new List<IEnumerable<GridAdvUnit>>();
public GridAdvVm()
public GridAdvVm(FlyAD7 flyad)
{
SaveCmd = new RelayCommand(Save);
LoadCmd = new RelayCommand(Load);
CalAdLagCmd = new RelayCommand(CalAdLag);
}
public void Init(Chart chart3, FlyAD7 flyad)
{
this.chart3 = chart3;
this.flyad = flyad;
InitializeComponent4();
this.flyad = flyad;
flyad.TimeGridAdvEvent += flyad_TimeGridAdvEvent;
}
void InitializeComponent4()
public void Init(Chart chart)
{
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
//
// chart1
//
chartArea1.AxisX.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
chartArea1.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
chartArea1.AxisY.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
chartArea1.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
chartArea1.BackColor = System.Drawing.Color.OldLace;
//chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
//chartArea1.BackSecondaryColor = System.Drawing.Color.White;
chartArea1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
chartArea1.BorderDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
chartArea1.Name = "Default";
chartArea1.ShadowColor = System.Drawing.Color.Transparent;
chartArea1.CursorX.IsUserEnabled = true;
chartArea1.CursorX.IsUserSelectionEnabled = true;
chartArea1.CursorX.SelectionColor = System.Drawing.SystemColors.Highlight;
chartArea1.CursorY.IsUserEnabled = true;
chartArea1.CursorY.IsUserSelectionEnabled = true;
chartArea1.CursorY.SelectionColor = System.Drawing.SystemColors.Highlight;
//对数坐标
//chartArea1.AxisY.IsLogarithmic = true;
//chartArea1.AxisY.LogarithmBase = Math.E;
chart3.ChartAreas.Add(chartArea1);
legend1.BackColor = System.Drawing.Color.Transparent;
legend1.Enabled = true;
legend1.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
legend1.Alignment = System.Drawing.StringAlignment.Near;
legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Right;
legend1.IsDockedInsideChartArea = true;
legend1.DockedToChartArea = chartArea1.Name;
//legend1.IsTextAutoFit = false;
legend1.Name = "Default";
chart3.Legends.Add(legend1);
series1.Name = "Series 1";
series1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
series1.BorderWidth = 3;
series1.ChartArea = chartArea1.Name;
series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
series1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(65)))), ((int)(((byte)(140)))), ((int)(((byte)(240)))));
series1.Legend = legend1.Name;
series1.LegendText = "Series 1";
series1.ShadowColor = System.Drawing.Color.Black;
series1.ShadowOffset = 2;
series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Int32;
series1.YValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Int32;
chart3.Series.Add(series1);
series2.Name = "Series 2";
series2.BorderColor = System.Drawing.Color.Pink;
series2.BorderWidth = 3;
series2.ChartArea = chartArea1.Name;
series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
series2.Color = System.Drawing.Color.Red;
series2.Legend = legend1.Name;
series2.LegendText = "Series 2";
series2.ShadowColor = System.Drawing.Color.Black;
series2.ShadowOffset = 2;
series2.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Int32;
series2.YValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Int32;
chart3.Series.Add(series2);
//this.chart1.Location = new System.Drawing.Point(16, 32);
chart3.Name = "chart3";
chart3.BackColor = System.Drawing.Color.Transparent;
this.chart3 = chart;
}
#region timeGridAdv
private async void flyad_TimeGridAdvEvent(object sender, TimeGridAdvEventArgs e)
{
if (chart3 == null)
return;
if (!HasGridAdv)
return;
......@@ -152,6 +72,8 @@ namespace Flyad7_WPF
void DrawGridAdv(IEnumerable<GridAdvUnit> units, int adLag = 0)
{
if (chart3 == null)
return;
flyad.ToGrid(units, out int[] datas, adLag);
//画图
timeGridAdvIndex++;
......
......@@ -399,6 +399,7 @@
<GroupBox x:Name="gbAutoGetGridAdv" Header="自动采集不同速度TimeGridAdv" d:DataContext="{d:DesignInstance Type=local:AutoGetGridAdv}" >
<StackPanel >
<StackPanel Orientation="Horizontal" >
<Button Style="{StaticResource ButtonStyle}" Content="数据分析" Command="{Binding AnalyzeCmd}" />
<Button Style="{StaticResource ButtonStyle}" Content="开始" Command="{Binding StartCmd}" />
<Button Style="{StaticResource ButtonStyle}" Content="停止" Command="{Binding StopCmd}" />
<StackPanel Orientation="Horizontal">
......
......@@ -23,6 +23,7 @@ using System.Windows.Forms.DataVisualization.Charting;
using Microsoft.Win32;
using System.IO;
using System.Threading.Tasks;
using Unity;
namespace Flyad7_WPF
{
......@@ -31,6 +32,7 @@ namespace Flyad7_WPF
/// </summary>
public partial class MainWindow : Window,INotifyPropertyChanged
{
IUnityContainer Container;
FlyAD7 flyad;
DebugAppParam param;
AutoForwBackw autofb;
......@@ -39,36 +41,29 @@ namespace Flyad7_WPF
AutoGetGridAdv autoGetGridAdv;
GridAdvVm gridAdvVm;
public MainWindow()
{
{
InitializeComponent();
InitializeComponent2();
InitializeComponent3();
InitializeComponent4();
Init();
}
param = new DebugAppParam();
param.Init();
flyad = new FlyAD7();
Misc.BindingOperations.SetBinding(param, "HasCRC", flyad, "HasCRC");
autofb = new AutoForwBackw(flyad);
Misc.BindingOperations.SetBinding(param, "FB_Pos1", autofb, "FB_Pos1", Misc.BindingOperations.BindingMode.TwoWay);
Misc.BindingOperations.SetBinding(param, "FB_Pos2", autofb, "FB_Pos2", Misc.BindingOperations.BindingMode.TwoWay);
flyad_clientui = new FlyADClientUI(flyad);
autoGetGridAdv = new AutoGetGridAdv();
autoGetGridAdv.Init(flyad);
mAutoSync = new AutoSync();
mAutoSync.Init(flyad);
gridAdvVm = new GridAdvVm();
gridAdvVm.Init(chart3, flyad);
Misc.BindingOperations.SetBinding(param, "HasGridAdv", gridAdvVm, "HasGridAdv",Misc.BindingOperations.BindingMode.TwoWay);
public void Init()
{
Container = App.Current.Properties["Container"] as IUnityContainer;
param = Container.Resolve<DebugAppParam>();
flyad = Container.Resolve<FlyAD7>();
autofb = Container.Resolve<AutoForwBackw>();
flyad_clientui = Container.Resolve<FlyADClientUI>();
autoGetGridAdv = Container.Resolve<AutoGetGridAdv>();
mAutoSync = Container.Resolve<AutoSync>();
gridAdvVm = Container.Resolve<GridAdvVm>();
gridAdvVm.Init(chart3);
this.DataContext = flyad;
this.grid_param.DataContext = param;
this.groupBox_fb.DataContext = autofb;
this.groupBox_adpos.DataContext = flyad_clientui;
......@@ -79,12 +74,9 @@ namespace Flyad7_WPF
flyad.TimeGridEvent += flyad_TimeGridEvent;
FObjBase.PollModule.Current.Start();
}
/// <summary>
/// grid图
/// </summary>
......@@ -220,6 +212,87 @@ namespace Flyad7_WPF
this.chart2.BackColor = System.Drawing.Color.Transparent;
}
void InitializeComponent4()
{
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
//
// chart1
//
chartArea1.AxisX.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
chartArea1.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
chartArea1.AxisY.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
chartArea1.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
chartArea1.BackColor = System.Drawing.Color.OldLace;
//chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
//chartArea1.BackSecondaryColor = System.Drawing.Color.White;
chartArea1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
chartArea1.BorderDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
chartArea1.Name = "Default";
chartArea1.ShadowColor = System.Drawing.Color.Transparent;
chartArea1.CursorX.IsUserEnabled = true;
chartArea1.CursorX.IsUserSelectionEnabled = true;
chartArea1.CursorX.SelectionColor = System.Drawing.SystemColors.Highlight;
chartArea1.CursorY.IsUserEnabled = true;
chartArea1.CursorY.IsUserSelectionEnabled = true;
chartArea1.CursorY.SelectionColor = System.Drawing.SystemColors.Highlight;
//对数坐标
//chartArea1.AxisY.IsLogarithmic = true;
//chartArea1.AxisY.LogarithmBase = Math.E;
chart3.ChartAreas.Add(chartArea1);
legend1.BackColor = System.Drawing.Color.Transparent;
legend1.Enabled = true;
legend1.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
legend1.Alignment = System.Drawing.StringAlignment.Near;
legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Right;
legend1.IsDockedInsideChartArea = true;
legend1.DockedToChartArea = chartArea1.Name;
//legend1.IsTextAutoFit = false;
legend1.Name = "Default";
chart3.Legends.Add(legend1);
series1.Name = "Series 1";
series1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
series1.BorderWidth = 3;
series1.ChartArea = chartArea1.Name;
series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
series1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(65)))), ((int)(((byte)(140)))), ((int)(((byte)(240)))));
series1.Legend = legend1.Name;
series1.LegendText = "Series 1";
series1.ShadowColor = System.Drawing.Color.Black;
series1.ShadowOffset = 2;
series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Int32;
series1.YValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Int32;
chart3.Series.Add(series1);
series2.Name = "Series 2";
series2.BorderColor = System.Drawing.Color.Pink;
series2.BorderWidth = 3;
series2.ChartArea = chartArea1.Name;
series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
series2.Color = System.Drawing.Color.Red;
series2.Legend = legend1.Name;
series2.LegendText = "Series 2";
series2.ShadowColor = System.Drawing.Color.Black;
series2.ShadowOffset = 2;
series2.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Int32;
series2.YValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Int32;
chart3.Series.Add(series2);
//this.chart1.Location = new System.Drawing.Point(16, 32);
chart3.Name = "chart3";
chart3.BackColor = System.Drawing.Color.Transparent;
}
#region grid
void flyad_GridEvent(object sender, MiniGridEventArgs e)
{
......
......@@ -95,6 +95,8 @@
<sys:String x:Key="strMonth">Month</sys:String>
<sys:String x:Key="strOrgInterval">OrgInterval</sys:String>
<sys:String x:Key="strGageLength">GageLength</sys:String>
<sys:String x:Key="strTimeGridAdv">TimeGridAdv</sys:String>
<sys:String x:Key="strAdLag">AdLag</sys:String>
<sys:String x:Key="strEncoder1Scale">Encoder1Scale</sys:String>
<sys:String x:Key="strEncoder2Scale">Encoder2Scale</sys:String>
<sys:String x:Key="strMmOfPulse">mm/Pulse</sys:String>
......
......@@ -99,6 +99,8 @@
<sys:String x:Key="strMonth">月</sys:String>
<sys:String x:Key="strOrgInterval">归零间隔</sys:String>
<sys:String x:Key="strGageLength">机架长度</sys:String>
<sys:String x:Key="strTimeGridAdv">高级AD数据</sys:String>
<sys:String x:Key="strAdLag">AD滞后</sys:String>
<sys:String x:Key="strEncoder1Scale">编码器1比例</sys:String>
<sys:String x:Key="strEncoder2Scale">编码器2比例</sys:String>
<sys:String x:Key="strMmOfPulse">mm/脉冲</sys:String>
......
......@@ -36,7 +36,6 @@ namespace ThickTcpUiInWindow
if (!serverep.Equals(value))
{
serverep = new IPEndPoint(value.Address, value.Port);
NotifyPropertyChanged("ServerIPEP");
}
}
}
......@@ -59,7 +58,6 @@ namespace ThickTcpUiInWindow
if (!string.IsNullOrEmpty(value))
{
_language = value;
NotifyPropertyChanged("Language");
}
}
}
......
......@@ -40,6 +40,10 @@ namespace FLY.Thick.Base.Client
/// </summary>
public int PosOfGrid { get; set; } = 10;
/// <summary>
/// timeGridAdv 使能
/// </summary>
public bool IsTimeGridAdvEnabled { get; set; }
/// <summary>
/// ad 滞后量 ms
/// </summary>
......@@ -186,6 +190,7 @@ namespace FLY.Thick.Base.Client
{
poslength = PosLength,
auto_org_interval = AutoOrgInterval,
isTimeGridAdvEnabled = IsTimeGridAdvEnabled,
adlag = ADLag,
encoder1_mmpp = Encoder1_mmpp,
......@@ -252,6 +257,7 @@ namespace FLY.Thick.Base.Client
PosLength = p.poslength;
AutoOrgInterval = p.auto_org_interval;
PosOfGrid = p.posOfGrid;
IsTimeGridAdvEnabled = p.isTimeGridAdvEnabled;
ADLag = p.adlag;
Encoder1_mmpp = p.encoder1_mmpp;
......
......@@ -14,6 +14,7 @@ namespace FLY.Thick.Base.IService
/// </summary>
int PosLength { get; set; }
bool IsTimeGridAdvEnabled { get; set; }
int ADLag { get; set; }
int PosOfGrid { get; }
......
......@@ -16,8 +16,9 @@ namespace FLY.Thick.Base.OBJ_INTERFACE
public int auto_org_interval;
public double encoder1_mmpp;
public bool isTimeGridAdvEnabled;
public int adlag;
public int posOfGrid;
public double speed1scale;
......
......@@ -52,6 +52,7 @@ namespace FLY.Thick.Base.Server.OBJProxy
encoder1_mmpp = mInitparam.Encoder1_mmpp,
speed1scale = mInitparam.Speed1Scale,
adlag = mInitparam.ADLag,
isTimeGridAdvEnabled = mInitparam.IsTimeGridAdvEnabled,
posOfGrid = mInitparam.PosOfGrid,
filmVSrc = mInitparam.FilmVSrc,
......@@ -97,6 +98,7 @@ namespace FLY.Thick.Base.Server.OBJProxy
var p = JsonConvert.DeserializeObject<INITPARAM_OBJ_INTERFACE.Pack_Params>(json);
mInitparam.PosLength = p.poslength;
mInitparam.IsTimeGridAdvEnabled = p.isTimeGridAdvEnabled;
mInitparam.ADLag = p.adlag;
mInitparam.AutoOrgInterval = p.auto_org_interval;
mInitparam.Encoder2_mmpp= p.encoder2_mmpp;
......
......@@ -18,5 +18,17 @@ using FLY.Thick.BulkDataModule;
namespace FLY.Thick.Base.Server
{
/// <summary>
/// int 版的 ad->thick 准备淘汰
/// </summary>
/// <param name="ad"></param>
/// <returns></returns>
[Obsolete("准备 被 AD2ThkHandler 替代")]
public delegate int AD2ThickHandler(int ad);
/// <summary>
/// double 版的 ad->thick
/// </summary>
/// <param name="ad"></param>
/// <returns></returns>
public delegate double AD2ThkHandler(int ad);
}
......@@ -24,9 +24,14 @@ namespace FLY.Thick.Base.Server
/// 从 flyad7 获取的
/// </summary>
public int PosOfGrid { get; set; } = 10;
/// <summary>
/// timeGridAdv 使能
/// </summary>
public bool IsTimeGridAdvEnabled { get; set; }
/// <summary>
/// ad 滞后量 ms
/// ad 滞后量 1.28ms
/// </summary>
public int ADLag { get; set; }
......@@ -197,6 +202,8 @@ namespace FLY.Thick.Base.Server
{
return new string[]{
"PosLength",
"ADLag",
"IsTimeGridAdvEnabled",
"AutoOrgInterval",
"VScan",
......
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