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

边界查找 提供 Border

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