Commit 55a18e0d authored by 潘栩锋's avatar 潘栩锋 🚴

可以的AD盒界面设置 是否使用电脑计算速度, 因为当前AD盒推送的速度 都是偏小很多

parent 23d8f843
......@@ -53,6 +53,10 @@
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="CRC" />
<ToggleButton Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding HasCRC}"/>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="不使用AD盒速度" />
<ToggleButton Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding IsCalSpeed}" HorizontalAlignment="Left"/>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="5" >
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="{DynamicResource strPulseOfGrid}" />
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding PosOfGrid}" />
......
......@@ -47,6 +47,10 @@ namespace FLY.Thick.Base.Client
}
}
}
/// <summary>
/// 通过脉冲计算速度,不使用AD盒的输出
/// </summary>
public bool IsCalSpeed { get; set; } = true;
public int PosLen { get; set; }
......@@ -87,7 +91,8 @@ namespace FLY.Thick.Base.Client
posoffset = PosOffset,
jogvelocity = JogVelocity,
hasCRC = HasCRC,
gridsmooth = GridSmooth
gridsmooth = GridSmooth,
IsCalSpeed = IsCalSpeed
};
string json = Newtonsoft.Json.JsonConvert.SerializeObject(p);
......@@ -198,6 +203,7 @@ namespace FLY.Thick.Base.Client
Ratio02 = p.ratio02;
HasCRC = p.hasCRC;
GridSmooth = p.gridsmooth;
IsCalSpeed = p.IsCalSpeed;
} break;
}
}
......
......@@ -24,6 +24,7 @@ namespace FLY.Thick.Base.OBJ_INTERFACE
public UInt32 jogvelocity;
public bool hasCRC;
public int gridsmooth;
public bool IsCalSpeed;
}
......
......@@ -36,6 +36,7 @@ namespace FLY.Thick.Base.Server.OBJProxy
if ((e.PropertyName == "LocalEP") ||
(e.PropertyName == "HasCRC") ||
(e.PropertyName == "GridSmooth") ||
(e.PropertyName == "IsCalSpeed") ||
(e.PropertyName == "PosOfGrid") ||
(e.PropertyName == "PosLen") ||
(e.PropertyName == "MotorType") ||
......@@ -69,6 +70,7 @@ namespace FLY.Thick.Base.Server.OBJProxy
ep = mFlyAD.LocalEP.ToString(),
hasCRC = mFlyAD.HasCRC,
gridsmooth = mFlyAD.GridSmooth,
IsCalSpeed = mFlyAD.IsCalSpeed,
posofgrid = mFlyAD.PosOfGrid,
motortype = (MOTORTYPE) mFlyAD.MotorType,
poslen = mFlyAD.PosLen,
......@@ -98,6 +100,7 @@ namespace FLY.Thick.Base.Server.OBJProxy
mFlyAD.HasCRC = p.hasCRC;
mFlyAD.GridSmooth = p.gridsmooth;
mFlyAD.IsCalSpeed = p.IsCalSpeed;
var ep = Misc.StringConverter.ToIPEndPoint(p.ep);
if(!mFlyAD.LocalEP.Equals(ep))
mFlyAD.Connect(ep);
......
......@@ -38,6 +38,11 @@ namespace FLY.Thick.Base.Server
/// </summary>
public int FLYAD7_GridSmooth { get; set; } = 0;
/// <summary>
/// 电脑计算速度,不通过AD盒获取
/// </summary>
public bool FLYAD7_IsCalSpeed { get; set; } = true;
#endregion
private string param_path = "sysparam.xml";
......@@ -58,7 +63,8 @@ namespace FLY.Thick.Base.Server
return;
if ((e.PropertyName == "FLYAD7EP")||
(e.PropertyName == "FLYAD7_HasCRC")||
(e.PropertyName == "FLYAD7_GridSmooth")
(e.PropertyName == "FLYAD7_GridSmooth")||
(e.PropertyName == "FLYAD7_IsCalSpeed")
)
{
Save();
......@@ -91,7 +97,7 @@ namespace FLY.Thick.Base.Server
"FLYAD7EP",
"FLYAD7_HasCRC",
"FLYAD7_GridSmooth",
"DBPath"
"FLYAD7_IsCalSpeed"
};
}
}
......
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