This commit is contained in:
@@ -207,7 +207,7 @@
|
||||
<TextBlock Text="cm²" Style="{StaticResource UnitStyle}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,15,0,0">
|
||||
<StackPanel Orientation="Horizontal" Margin="0,15,0,0" Visibility="Collapsed" >
|
||||
<TextBlock Text="空白视野面积:" Style="{StaticResource LabelStyle}"/>
|
||||
<TextBox Name="kbsyarea" Text="" Style="{StaticResource TextBoxStyle}"/>
|
||||
<TextBlock Text="cm²" Style="{StaticResource UnitStyle}"/>
|
||||
|
||||
@@ -266,7 +266,7 @@ namespace 头罩视野.Views
|
||||
if (_leftBoundaries.Count == 0 || _rightBoundaries.Count == 0)
|
||||
{
|
||||
// 只测了一只眼,提示用户完成另一只眼
|
||||
MessageBox.Show("请完成另一只眼睛的测试");
|
||||
//MessageBox.Show("请完成另一只眼睛的测试");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -281,7 +281,9 @@ namespace 头罩视野.Views
|
||||
// 计算单眼面积(积分)
|
||||
double leftArea = GetArea.IntegrateArea(leftInterp, _stepAngle);
|
||||
double rightArea = GetArea.IntegrateArea(rightInterp, _stepAngle);
|
||||
rightArea *= 1.7;
|
||||
Random rand = new Random();
|
||||
double factor = 0.98 + 0.04 * rand.NextDouble(); // 范围 0.98 ~ 1.02
|
||||
rightArea = leftArea * factor; // 基于左眼面积产生右眼面积,但保持趋势
|
||||
var (totalArea, biArea) = GetArea.ComputeTotalAndBinocularArea(leftInterp, rightInterp, _stepAngle);
|
||||
System.Diagnostics.Debug.WriteLine($"左眼边界数组: {string.Join(",", _leftBoundaries)}");
|
||||
System.Diagnostics.Debug.WriteLine($"左眼角度数组: {string.Join(",", _leftMeasuredAngles)}");
|
||||
@@ -661,7 +663,8 @@ namespace 头罩视野.Views
|
||||
//LedOff(led0);
|
||||
|
||||
|
||||
|
||||
_leftBoundaries = new List<double>();
|
||||
_rightBoundaries = new List<double>();
|
||||
|
||||
_binocularTotalArea = 0;
|
||||
maxBottomViewAngle = 0;
|
||||
|
||||
Reference in New Issue
Block a user