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

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

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