diff --git a/头罩视野slove/头罩视野/Services/GetArea.cs b/头罩视野slove/头罩视野/Services/GetArea.cs index 32a4926..688ebc6 100644 --- a/头罩视野slove/头罩视野/Services/GetArea.cs +++ b/头罩视野slove/头罩视野/Services/GetArea.cs @@ -35,7 +35,7 @@ namespace 头罩视野.Services // 剔除异常值,用相邻数据插值 - public static List RemoveOutliers(List data) + public static List RemoveOutliers(List data) { for (int i = 1; i < data.Count - 1; i++) { @@ -62,7 +62,7 @@ namespace 头罩视野.Services /// (如140) /// 计算好的面积 /// - public static double CalculateEyeArea(List groupData) + public static double CalculateEyeArea(List groupData) { double[] avg = new double[lightNum]; for (int c = 0; c < lightNum; c++) @@ -84,8 +84,8 @@ namespace 头罩视野.Services /// 计算双目视野面积(左右眼同时可见) /// public static double CalcBinocularArea( - List leftGroups, - List rightGroups + List leftGroups, + List rightGroups ) { // 1. 左眼平均数据 @@ -160,7 +160,7 @@ namespace 头罩视野.Services /// /// 多组采样数据集合 /// lightNum点通道平均值数组 - public static double[] GetEyeAvgArray(List eyeGroups) + public static double[] GetEyeAvgArray(List eyeGroups) { if (eyeGroups == null || eyeGroups.Count == 0) return new double[lightNum]; // 无数据时返回全0数组 diff --git a/头罩视野slove/头罩视野/Views/PageTest.xaml.cs b/头罩视野slove/头罩视野/Views/PageTest.xaml.cs index e8358da..af19126 100644 --- a/头罩视野slove/头罩视野/Views/PageTest.xaml.cs +++ b/头罩视野slove/头罩视野/Views/PageTest.xaml.cs @@ -30,8 +30,8 @@ namespace 头罩视野.Views private CancellationTokenSource? _cts; private IModbusMaster _modbusMaster => ModbusResourceManager.Instance.ModbusMaster; - public List LeftEyeDataList { get; private set; } - public List RightEyeDataList { get; private set; } + //public List LeftEyeDataList { get; private set; } + //public List RightEyeDataList { get; private set; } DispatcherTimer _timer; DataChange c = new DataChange(); diff --git a/头罩视野slove/头罩视野/Views/RecordDate.xaml.cs b/头罩视野slove/头罩视野/Views/RecordDate.xaml.cs index e64dea7..54c7204 100644 --- a/头罩视野slove/头罩视野/Views/RecordDate.xaml.cs +++ b/头罩视野slove/头罩视野/Views/RecordDate.xaml.cs @@ -31,8 +31,8 @@ namespace 头罩视野.Views private IModbusMaster _modbusMaster => ModbusResourceManager.Instance.ModbusMaster; private System.Timers.Timer? _plcReadTimer; // 表跟数据存储列表 - public List LeftEyeDataList = new List(); - public List RightEyeDataList = new List(); + public List LeftEyeDataList = new List(); + public List RightEyeDataList = new List(); // 配置:和你PLC地址完全对应 左目 private const int LeftEyeStartAddress = 1362; // D1362 @@ -139,7 +139,7 @@ namespace 头罩视野.Views byte slaveAddress, ushort startAddress, ushort count, - List dataList, + List dataList, DataGrid dataGrid) { if (_modbusMaster == null || !ModbusHelper.TcpClient.Connected) @@ -173,7 +173,7 @@ namespace 头罩视野.Views /// /// 把PLC数据添加到动态表格 /// - private void AddPlcDataRow(ushort[] registers, List dataList, DataGrid dg) + private void AddPlcDataRow(ushort[] registers, List dataList, DataGrid dg) { // 清空旧数据,防止重复 @@ -205,7 +205,7 @@ namespace 头罩视野.Views } //面积的计算方法 - public void getAllData(List leftEyeDataList, List RightEyeDataList, double perAngle) + public void getAllData(List leftEyeDataList, List RightEyeDataList, double perAngle) {