Commit cda4d048 authored by 潘栩锋's avatar 潘栩锋 🚴

修复 忘记解决 正常的边界查找, 得到的是拐点, 但需要推送的数据是斜波的中心

parent 1b325e17
......@@ -656,7 +656,7 @@ namespace FLY.Thick.Base.Server
border.isBeginOk = isBorderBeginOk;
border.isEndOk = isBorderEndOk;
getViewReponse.border = border.value;
if (borders.All(b => b.value.IsValid))
{
......@@ -674,6 +674,9 @@ namespace FLY.Thick.Base.Server
Border.Copy(border.real);
}
getViewReponse.border = border.real;
Width = Border.Width;
Mid = Border.Mid;
return true;
......
......@@ -128,16 +128,17 @@ namespace FLY.Thick.Base.Server
int idx = (direction == DIRECTION.FORWARD) ? 0 : 1;
var border = borders[idx];
//borderbegin_grid, borderend_grid 是实际边界位置,
//border.value 是空气与膜的拐点
//必须外扩
//转为 脉冲
border.value.Begin = (borderbegin_grid + gridBegin) * posOfGrid;
border.value.End = (borderend_grid + gridBegin) * posOfGrid;
border.value.Begin = (borderbegin_grid + gridBegin) * posOfGrid - SensorWidth / 2;
border.value.End = (borderend_grid + gridBegin) * posOfGrid + SensorWidth / 2;
border.isBeginOk = true;
border.isEndOk = true;
border.UpdateReal(SensorWidth);
getViewReponse.border = border.value;
if (borders.All(b => b.value.IsValid))
{
Border.Begin = (int)borders.Average(b => b.real.Begin);
......@@ -147,6 +148,9 @@ namespace FLY.Thick.Base.Server
{
Border.Copy(border.real);
}
getViewReponse.border = border.real;
Width = Border.Width;
Mid = Border.Mid;
return true;
......
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