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

修复 BlowingDetect angle 计算出很大值

parent a158e734
...@@ -608,8 +608,10 @@ namespace FLY.Thick.Blowing.Server ...@@ -608,8 +608,10 @@ namespace FLY.Thick.Blowing.Server
{ {
DateTime dt1 = mLimitList[mLimitList.Count - 1].dt_begin; DateTime dt1 = mLimitList[mLimitList.Count - 1].dt_begin;
DateTime dt2 = mLimitList[mLimitList.Count - 2].dt_end; DateTime dt2 = mLimitList[mLimitList.Count - 2].dt_end;
if(dt1 > dt2) {
RenZiJiaPeriod = dt1 - dt2;//只有这个是正确的!!! RenZiJiaPeriod = dt1 - dt2;//只有这个是正确的!!!
//触发修正事件!!!!! //触发修正事件!!!!!
}
TouchFilmInfoChanged(dt2); TouchFilmInfoChanged(dt2);
} }
else if (mLimitList.Count == 1) else if (mLimitList.Count == 1)
...@@ -1391,8 +1393,15 @@ namespace FLY.Thick.Blowing.Server ...@@ -1391,8 +1393,15 @@ namespace FLY.Thick.Blowing.Server
{ {
TimeSpan ts1 = dt - dtStart; TimeSpan ts1 = dt - dtStart;
TimeSpan ts2 = dtEnd - dtStart; TimeSpan ts2 = dtEnd - dtStart;
if (ts2.TotalMinutes < 1 || ts1.TotalMinutes <= 0)
{
//异常
angle = 0;
}
else
{
angle = RAngle * ts1.Ticks / ts2.Ticks; angle = RAngle * ts1.Ticks / ts2.Ticks;
}
if (noStart == 0) if (noStart == 0)
{ {
...@@ -1475,8 +1484,12 @@ namespace FLY.Thick.Blowing.Server ...@@ -1475,8 +1484,12 @@ namespace FLY.Thick.Blowing.Server
break; break;
case ListFindIndexResult.Past://过去 case ListFindIndexResult.Past://过去
{ {
if (mDefaultTime >= mLimitList[0].dt_begin) {
//异常?!!!!
mDefaultTime = mLimitList[0].dt_begin - RenZiJiaPeriod;
}
dt_start = mDefaultTime; dt_start = mDefaultTime;
dt_end = mLimitList[0].dt_begin; dt_end = mLimitList[0].dt_begin;
no = (mLimitList[0].no == 0) ? 1 : 0; no = (mLimitList[0].no == 0) ? 1 : 0;
rotationCnt = LimitIndexToRotationCnt(-1); rotationCnt = LimitIndexToRotationCnt(-1);
......
Subproject commit 9512dcc5dd3a842e9f8275fcf185e63f114be2a9 Subproject commit 5570eba0b4a11ab7f1e9c23f033296229733f92f
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