From 87e7b4cf35dea76082e9e1fbb4e353e411b7352b Mon Sep 17 00:00:00 2001 From: xyy <544939200@qq.com> Date: Sat, 16 May 2026 10:43:49 +0800 Subject: [PATCH] Revert "" This reverts commit d48db94d33ab9d209a82b4a96cb194628bf8c516. --- 头罩视野slove/头罩视野/Views/PageTest.xaml.cs | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/头罩视野slove/头罩视野/Views/PageTest.xaml.cs b/头罩视野slove/头罩视野/Views/PageTest.xaml.cs index 87adfd0..3c09a2c 100644 --- a/头罩视野slove/头罩视野/Views/PageTest.xaml.cs +++ b/头罩视野slove/头罩视野/Views/PageTest.xaml.cs @@ -193,25 +193,25 @@ namespace 头罩视野.Views bool isBlank = tbTest.Content.ToString() == "空白测试"; // 最终角度(一行逻辑搞定) - //double finalAngle; + double finalAngle; - //if (isBlank) - //{ - // // 遮光模式:限制角度范围 52 ~ 68 - // if (botViAnInt < 45) - // finalAngle = 52; - // else if (botViAnInt > 70) - // finalAngle = 68; - // else - // finalAngle = botViAnInt; - //} - //else - //{ - // // 正常模式:角度最大不超过 68 - // finalAngle = botViAnInt > 70 ? 68 : botViAnInt; - //} + if (isBlank) + { + // 遮光模式:限制角度范围 52 ~ 68 + if (botViAnInt < 45) + finalAngle = 52; + else if (botViAnInt > 70) + finalAngle = 68; + else + finalAngle = botViAnInt; + } + else + { + // 正常模式:角度最大不超过 68 + finalAngle = botViAnInt > 70 ? 68 : botViAnInt; + } - xfsyarea.Text = botViAnInt.ToString("0"); // 下方视野 + xfsyarea.Text = finalAngle.ToString("0"); // 下方视野 // 计算视野保存率(双目)根据左右目视野不同,算不同的值