页面逻辑调整
This commit is contained in:
@@ -21,7 +21,7 @@ namespace 头罩视野.Services
|
|||||||
|
|
||||||
|
|
||||||
//空白视野面积计算
|
//空白视野面积计算
|
||||||
public static readonly double _standardTotalArea = 2 * Math.PI * 330 * 330;
|
public static readonly double _standardTotalArea = (Math.PI * R * R) / 100;
|
||||||
|
|
||||||
public static double GetBlankViewArea(double binocularTotalArea)
|
public static double GetBlankViewArea(double binocularTotalArea)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -173,12 +173,11 @@ namespace 头罩视野.Views
|
|||||||
_binocularTotalArea = 0;
|
_binocularTotalArea = 0;
|
||||||
maxBottomViewAngle = 0;
|
maxBottomViewAngle = 0;
|
||||||
|
|
||||||
isLeftOnly = btnLeft.Content.ToString() == "左眼开" && btnRight.Content.ToString() == "右眼关";
|
isLeftOnly = btnLeft.Content.ToString() == "左眼关" && btnRight.Content.ToString() == "右眼开";
|
||||||
isRightOnly = btnRight.Content.ToString() == "右眼开" && btnLeft.Content.ToString() == "左眼关";
|
isRightOnly = btnRight.Content.ToString() == "左眼开" && btnLeft.Content.ToString() == "右眼关";
|
||||||
isBinocular = btnLeft.Content.ToString() == "左眼开" && btnRight.Content.ToString() == "右眼开";
|
isBinocular = btnLeft.Content.ToString() == "左眼关" && btnRight.Content.ToString() == "右眼关";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
System.Diagnostics.Debug.WriteLine($"灯条数据:{isLeftOnly}1111{isRightOnly}11111{isBinocular}");
|
||||||
await calCurrentangle();
|
await calCurrentangle();
|
||||||
|
|
||||||
_nextTargetAngle = _stepAngle;
|
_nextTargetAngle = _stepAngle;
|
||||||
@@ -547,10 +546,10 @@ namespace 头罩视野.Views
|
|||||||
//复位btn
|
//复位btn
|
||||||
private void Button_Click_Reset(object sender, RoutedEventArgs e)
|
private void Button_Click_Reset(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
btnLeft.Content = "左眼开";
|
//btnLeft.Content = "左眼开";
|
||||||
btnRight.Content = "右眼开";
|
//btnRight.Content = "右眼开";
|
||||||
LedOff(led1);
|
//LedOff(led1);
|
||||||
LedOff(led0);
|
//LedOff(led0);
|
||||||
ma.BtnClickFunction(Function.ButtonType.复归型, 90);
|
ma.BtnClickFunction(Function.ButtonType.复归型, 90);
|
||||||
}
|
}
|
||||||
//左开眼
|
//左开眼
|
||||||
@@ -669,7 +668,6 @@ namespace 头罩视野.Views
|
|||||||
private void Page_Loaded(object sender, RoutedEventArgs e)
|
private void Page_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
System.Diagnostics.Debug.WriteLine("页面加载了!112222222");
|
System.Diagnostics.Debug.WriteLine("页面加载了!112222222");
|
||||||
_timer.Start();
|
_timer.Start();
|
||||||
ma = new Function(_modbusMaster);
|
ma = new Function(_modbusMaster);
|
||||||
|
|||||||
Reference in New Issue
Block a user