Commit 52fa4a1a authored by 潘栩锋's avatar 潘栩锋 🚴

边界查找 提供 Border

parent 248af6bc
...@@ -18,14 +18,10 @@ namespace FlyADBase ...@@ -18,14 +18,10 @@ namespace FlyADBase
{ {
} }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="data"></param>
public TimeGridAdvEventArgs(GridAdvUnit[] data)
{
Data = data;
}
public int Marker { get; set; } public int Marker { get; set; }
/// <summary> /// <summary>
/// 数据 /// 数据
......
...@@ -32,11 +32,14 @@ namespace FLY.Thick.Base.Client ...@@ -32,11 +32,14 @@ namespace FLY.Thick.Base.Client
/// </summary> /// </summary>
public bool IsBreakDetect { get; set; } = true; public bool IsBreakDetect { get; set; } = true;
public Range Valid { get; } = new Range(); [PropertyChanged.DoNotCheckEquality]
public Range Valid { get; set; } = new Range();
public Range Border_Backw { get; } = new Range(); [PropertyChanged.DoNotCheckEquality]
public Range Border_Backw { get; private set; } = new Range();
public Range Border_Forw { get; } = new Range(); [PropertyChanged.DoNotCheckEquality]
public Range Border_Forw { get; private set; } = new Range();
[PropertyChanged.DoNotCheckEquality]
public Range Border { get; private set; } = new Range();
/// <summary> /// <summary>
...@@ -162,8 +165,7 @@ namespace FLY.Thick.Base.Client ...@@ -162,8 +165,7 @@ namespace FLY.Thick.Base.Client
var p = Newtonsoft.Json.JsonConvert.DeserializeObject<BORDERSEARCH_OBJ_INTERFACE.Pack_Params>(json); var p = Newtonsoft.Json.JsonConvert.DeserializeObject<BORDERSEARCH_OBJ_INTERFACE.Pack_Params>(json);
Enable = p.enable; Enable = p.enable;
Valid.Begin = p.valid.Begin; Valid = p.valid;
Valid.End = p.valid.End;
TempADBySet = p.tempADBySet; TempADBySet = p.tempADBySet;
TempAD = p.tempad; TempAD = p.tempad;
TempRange = p.temprange; TempRange = p.temprange;
...@@ -181,12 +183,9 @@ namespace FLY.Thick.Base.Client ...@@ -181,12 +183,9 @@ namespace FLY.Thick.Base.Client
string json = Misc.Converter.BytesToString(infodata); string json = Misc.Converter.BytesToString(infodata);
var p = Newtonsoft.Json.JsonConvert.DeserializeObject<BORDERSEARCH_OBJ_INTERFACE.Pack_Result>(json); var p = Newtonsoft.Json.JsonConvert.DeserializeObject<BORDERSEARCH_OBJ_INTERFACE.Pack_Result>(json);
Border_Forw = p.borderForw;
Border_Backw = p.borderBackw;
Border_Forw.Begin = p.borderForw.Begin; Border = p.border;
Border_Forw.End = p.borderForw.End;
Border_Backw.Begin = p.borderBackw.Begin;
Border_Backw.End = p.borderBackw.End;
Width = p.width; Width = p.width;
Mid = p.mid; Mid = p.mid;
} break; } break;
......
...@@ -24,15 +24,19 @@ namespace FLY.Thick.Base.IService ...@@ -24,15 +24,19 @@ namespace FLY.Thick.Base.IService
/// <summary> /// <summary>
/// 有限范围 /// 有限范围
/// </summary> /// </summary>
Range Valid{get;} Range Valid{ get; set; }
/// <summary> /// <summary>
/// 反向边界 /// 反向边界
/// </summary> /// </summary>
Range Border_Backw{get;} Range Border_Backw{ get; }
/// <summary> /// <summary>
/// 正向边界 /// 正向边界
/// </summary> /// </summary>
Range Border_Forw{get;} Range Border_Forw{ get; }
/// <summary>
/// 边界
/// </summary>
Range Border { get; }
/// <summary> /// <summary>
/// 当前膜宽,测量出来的,单位是 脉冲 /// 当前膜宽,测量出来的,单位是 脉冲
/// </summary> /// </summary>
......
...@@ -30,6 +30,7 @@ namespace FLY.Thick.Base.OBJ_INTERFACE ...@@ -30,6 +30,7 @@ namespace FLY.Thick.Base.OBJ_INTERFACE
{ {
public Range borderForw; public Range borderForw;
public Range borderBackw; public Range borderBackw;
public Range border;
public int width; public int width;
public int mid; public int mid;
......
...@@ -144,8 +144,7 @@ namespace FLY.Thick.Base.Server.OBJProxy ...@@ -144,8 +144,7 @@ namespace FLY.Thick.Base.Server.OBJProxy
var p = Newtonsoft.Json.JsonConvert.DeserializeObject<BORDERSEARCH_OBJ_INTERFACE.Pack_Params>(json); var p = Newtonsoft.Json.JsonConvert.DeserializeObject<BORDERSEARCH_OBJ_INTERFACE.Pack_Params>(json);
mBorderSearch.Enable = p.enable; mBorderSearch.Enable = p.enable;
mBorderSearch.Valid.Begin = p.valid.Begin; mBorderSearch.Valid = p.valid;
mBorderSearch.Valid.End = p.valid.End;
mBorderSearch.TempRange = p.temprange; mBorderSearch.TempRange = p.temprange;
mBorderSearch.TempADBySet = p.tempADBySet; mBorderSearch.TempADBySet = p.tempADBySet;
......
...@@ -35,7 +35,8 @@ namespace FLY.Thick.Base.Server ...@@ -35,7 +35,8 @@ namespace FLY.Thick.Base.Server
/// <summary> /// <summary>
/// 有限范围 /// 有限范围
/// </summary> /// </summary>
public Range Valid { get; } = new Range(); [PropertyChanged.DoNotCheckEquality]
public Range Valid { get; set; } = new Range();
/// <summary> /// <summary>
/// 边界 /// 边界
/// </summary> /// </summary>
...@@ -45,12 +46,10 @@ namespace FLY.Thick.Base.Server ...@@ -45,12 +46,10 @@ namespace FLY.Thick.Base.Server
/// </summary> /// </summary>
public Range Border_Backw { get { return border[1]; } } public Range Border_Backw { get { return border[1]; } }
/// <summary> /// <summary>
/// 膜范围 /// 膜范围
/// </summary> /// </summary>
public Range Border = new Range(); public Range Border { get; set; } = new Range();
/// <summary> /// <summary>
/// 当前膜宽,测量出来的,单位是 脉冲 /// 当前膜宽,测量出来的,单位是 脉冲
...@@ -61,27 +60,22 @@ namespace FLY.Thick.Base.Server ...@@ -61,27 +60,22 @@ namespace FLY.Thick.Base.Server
/// 膜中间位置 单位 脉冲 /// 膜中间位置 单位 脉冲
/// </summary> /// </summary>
public int Mid { get; protected set; } public int Mid { get; protected set; }
/// <summary> /// <summary>
/// 手动设置温修AD值 /// 手动设置温修AD值
/// </summary> /// </summary>
public bool TempADBySet { get; set; } public bool TempADBySet { get; set; }
/// <summary> /// <summary>
/// 温修AD值 /// 温修AD值
/// </summary> /// </summary>
public int CurrTempAD { get; set; } = 50000; public int CurrTempAD { get; set; } = 50000;
/// <summary> /// <summary>
/// 温修AD值 /// 温修AD值
/// </summary> /// </summary>
public int TempAD { get; set; } = 50000; public int TempAD { get; set; } = 50000;
/// <summary> /// <summary>
/// AD超过了范围, 就认为开始找到边界 /// AD超过了范围, 就认为开始找到边界
/// </summary> /// </summary>
...@@ -135,9 +129,8 @@ namespace FLY.Thick.Base.Server ...@@ -135,9 +129,8 @@ namespace FLY.Thick.Base.Server
{ {
Default(); Default();
this.PropertyChanged += new PropertyChangedEventHandler(BorderSearch_PropertyChanged); this.PropertyChanged += new PropertyChangedEventHandler(BorderSearch_PropertyChanged);
this.Valid.PropertyChanged += new PropertyChangedEventHandler(Valid_PropertyChanged);
this.Border_Forw.PropertyChanged += new PropertyChangedEventHandler(Border_Forw_PropertyChanged);
this.Border_Backw.PropertyChanged += new PropertyChangedEventHandler(Border_Backw_PropertyChanged);
} }
public BorderSearch(string param_path) public BorderSearch(string param_path)
...@@ -146,17 +139,23 @@ namespace FLY.Thick.Base.Server ...@@ -146,17 +139,23 @@ namespace FLY.Thick.Base.Server
this.param_path = param_path; this.param_path = param_path;
Default(); Default();
this.PropertyChanged += new PropertyChangedEventHandler(BorderSearch_PropertyChanged); this.PropertyChanged += new PropertyChangedEventHandler(BorderSearch_PropertyChanged);
this.Valid.PropertyChanged += new PropertyChangedEventHandler(Valid_PropertyChanged);
this.Border_Forw.PropertyChanged += new PropertyChangedEventHandler(Border_Forw_PropertyChanged); this.Border_Forw.PropertyChanged += (s, e) => {
this.Border_Backw.PropertyChanged += new PropertyChangedEventHandler(Border_Backw_PropertyChanged); NotifyPropertyChanged("Border_Forw");
};
this.Border_Backw.PropertyChanged += (s, e) => {
NotifyPropertyChanged("Border_Backw");
};
this.Border.PropertyChanged += (s, e) => {
NotifyPropertyChanged("Border");
};
Load(); Load();
} }
void Default() void Default()
{ {
Enable = false; Enable = false;
Valid.Begin = 1200; Valid = new Range() { Begin = 1200, End = 7400 };
Valid.End = 7400;
Init(); Init();
TempAD = -1; TempAD = -1;
...@@ -173,20 +172,9 @@ namespace FLY.Thick.Base.Server ...@@ -173,20 +172,9 @@ namespace FLY.Thick.Base.Server
TempRangePercent = 500.0 / 50000; TempRangePercent = 500.0 / 50000;
IsTempRangeByPercent = true; IsTempRangeByPercent = true;
} }
void Border_Backw_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
NotifyPropertyChanged("Border_Backw");
}
void Border_Forw_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
NotifyPropertyChanged("Border_Forw");
}
void Valid_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
NotifyPropertyChanged("Valid");
}
void BorderSearch_PropertyChanged(object sender, PropertyChangedEventArgs e) void BorderSearch_PropertyChanged(object sender, PropertyChangedEventArgs e)
{ {
......
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