Commit 1b325e17 authored by 潘栩锋's avatar 潘栩锋 🚴
parents f88e593c 1ca3aa5a
......@@ -517,14 +517,14 @@ namespace FLY.Thick.Base.UI
StripLine stripline = new StripLine();
stripline.BackColor = System.Drawing.Color.FromArgb(64, System.Drawing.Color.Green);
stripline.Interval = 0;
stripline.IntervalOffset = border.Begin;
stripline.IntervalOffset = border.Begin - BorderSearchService.SensorWidth/2;
stripline.StripWidth = BorderSearchService.SensorWidth;
stripLines.Add(stripline);
stripline = new StripLine();
stripline.BackColor = System.Drawing.Color.FromArgb(64, System.Drawing.Color.Green);
stripline.Interval = 0;
stripline.IntervalOffset = border.End - BorderSearchService.SensorWidth;
stripline.IntervalOffset = border.End - BorderSearchService.SensorWidth/2;
stripline.StripWidth = BorderSearchService.SensorWidth;
stripLines.Add(stripline);
}
......
......@@ -33,15 +33,15 @@ namespace FLY.Thick.Base.Server
//算空气的平均值
Range r2_grid = new Range();
r2_grid.Begin = borderbegin_grid - sensor_grid;
r2_grid.End = borderend_grid + sensor_grid;
r2_grid.Begin = borderbegin_grid - sensor_grid/3;
r2_grid.End = borderend_grid + sensor_grid/3;
if (r2_grid.Begin < 0)
r2_grid.Begin = 0;
if (r2_grid.End > dat.Length - 1)
r2_grid.End = dat.Length - 1;
int avg1 = MyMath.Avg(dat, 0, r1_grid.Begin);
int avg2 = MyMath.Avg(dat, r1_grid.End, dat.Length - 1);
int avg1 = MyMath.Avg(dat, 0, r2_grid.Begin);
int avg2 = MyMath.Avg(dat, r2_grid.End, dat.Length - 1);
int threshold;
if ((Misc.MyBase.ISVALIDATA(avg1)) && (Misc.MyBase.ISVALIDATA(avg2)))
{
......@@ -57,7 +57,7 @@ namespace FLY.Thick.Base.Server
}
else
{
threshold = avg / 2;
threshold = (TempAD+avg) / 2;
}
//左边界
......
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