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

删除多余的

parent 69b2a004
......@@ -25,22 +25,9 @@ namespace FLY.Thick.Base.Common
}
#region BASE
/// <summary>
///
/// </summary>
public int Thick {
get {
if (double.IsNaN(Thk))
{
return Misc.MyBase.NULL_VALUE;
}
else {
return (int)(Thk * 100);
}
}
}
/// <summary>
///
/// AD 值经过 曲线转换的 测量值
/// </summary>
public double Thk { get; set; } = 100.23;
......@@ -49,23 +36,11 @@ namespace FLY.Thick.Base.Common
/// </summary>
public int Position { get; set; }
/// <summary>
/// 分区序号
/// </summary>
public int BoltIndex { get; set; }
/// <summary>
/// 分区号
/// </summary>
public int BoltNo
{
get { return BoltIndex + FirstBoltNo; }
}
/// <summary>
/// AD值
/// </summary>
public int AD { get; set; } = 12345;
/// <summary>
/// 最大AD值
/// </summary>
......@@ -149,21 +124,6 @@ namespace FLY.Thick.Base.Common
#endregion
#region BOLTMAP 分区信息
/// <summary>
/// 总分区数
/// </summary>
public int NBolts { get; set; } = 50;
/// <summary>
/// 开始分区号
/// </summary>
public int FirstBoltNo { get; set; }
#endregion
#region INotifyPropertyChanged 成员
public event PropertyChangedEventHandler PropertyChanged;
......
......@@ -125,8 +125,7 @@ namespace FLY.Thick.Base.Server
}
else if (e.PropertyName == nameof(flyAd.Position2))
{
double filmPos = Pos2ToFilmPos(flyAd.Position2);
FilmPosition = filmPos;
FilmPosition = Pos2ToFilmPos(flyAd.Position2);
}
}
......@@ -292,6 +291,24 @@ namespace FLY.Thick.Base.Server
#endregion
/// <summary>
/// 让同步信号输出 1到0 1秒后, 0到1
/// </summary>
public void SyncSysTime()
{
flyAd.SetOutputBit(FlyADIODefine.Instance.OutNo_Sync, false);
//1秒后,复位同步信号
PollModule.Current.Poll_Config(PollModule.POLL_CONFIG.ADD,
() => {
flyAd.SetOutputBit(FlyADIODefine.Instance.OutNo_Sync, true);
},
TimeSpan.FromSeconds(1), true, false, this, MARKNO_SYNC_HIGH, true);
}
/// <summary>
/// 设置膜位置为某值
/// </summary>
......@@ -302,31 +319,16 @@ namespace FLY.Thick.Base.Server
{
reset_pos2 = flyAd.Position2;
reset_filmPos = filmPos;
FilmPosition = Pos2ToFilmPos(flyAd.Position2);
}
else
{
RCnt = 0;
BaseFilmPosition = filmPos;
}
FilmPosition = filmPos;
}
/// <summary>
/// 让同步信号输出 1到0 1秒后, 0到1
/// </summary>
public void SyncSysTime()
{
flyAd.SetOutputBit(FlyADIODefine.Instance.OutNo_Sync, false);
//1秒后,复位同步信号
PollModule.Current.Poll_Config(PollModule.POLL_CONFIG.ADD,
() => {
flyAd.SetOutputBit(FlyADIODefine.Instance.OutNo_Sync, true);
},
TimeSpan.FromSeconds(1), true, false, this, MARKNO_SYNC_HIGH, true);
}
/// <summary>
/// 设置膜位置为某值; 同步服务器调用的
/// </summary>
......@@ -350,15 +352,17 @@ namespace FLY.Thick.Base.Server
{
reset_pos2 = flyAd.Position2;
}
FilmPosition = Pos2ToFilmPos(flyAd.Position2);
}
else
{
RCnt = 0;
BaseFilmPosition = filmPos;
}
FilmPosition = filmPos;
}
}
double Pos2ToFilmPos(int pos2)
{
......
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