This commit is contained in:
2026-05-06 09:21:35 +08:00
parent 3fcb6ea0c5
commit c707b4994e
7 changed files with 15 additions and 855 deletions

View File

@@ -214,8 +214,21 @@ namespace 头罩视野.Views
ButtonTest.Content = "测试中....";
testTimer.Start();
double stepAngle;
double.TryParse(fbspeed.Text.Trim(), out double val);
// 范围判断:必须在 0 ~ 180 之间
if (val <= 0 || val > 180)
{
stepAngle = 10.0; // 超出范围用默认值
}
else
{
stepAngle = val; // 正常就用输入值
}
// 1. 读取输入框
double stepAngle = double.Parse(fbspeed.Text); // 分辨角度 例10
// 分辨角度 例10
bool isLeftOnly = btnLeft.Content.ToString() == "左眼开" && btnRight.Content.ToString() == "右眼关";
bool isRightOnly = btnRight.Content.ToString() == "右眼开" && btnLeft.Content.ToString() == "左眼关";