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

修复 追边测厚仪,当辊速度数据不在 列表中, 会异常,一直没图

parent 6265b102
......@@ -222,7 +222,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
int ret = GetAgo(dt, out DateTime ago_dt, out int ago_index);
if (ret != 0)
if (ret > 0)
return ret;//发生在未来不处理!!!
......@@ -340,7 +340,12 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
int GetAgo(DateTime dt, out DateTime ago_dt, out int ago_index)
{
if (Is3D)
return GetAgo3D(dt, out ago_dt, out ago_index);
{
var ret = GetAgo3D(dt, out ago_dt, out ago_index);
if (ret != -1)
return ret;
return GetAgoFix(dt, out ago_dt, out ago_index);
}
else
return GetAgoFix(dt, out ago_dt, out ago_index);
}
......@@ -785,14 +790,19 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
{
idx = 0;
dt = DateTime.MinValue;
if (mRollList.Count == 0)
return 1;
if (filmPosition < 0)
{
//发生在过去。 只能猜
dt = RollList_GetDateTime(idx, filmPosition);
return -1;
}
if (mRollList.Count == 0)
return 1;
idx = (int)(filmPosition / MofR);
if (idx >= mRollList.Count - 1) {
if (idx >= mRollList.Count - 1)
{
return 1;
}
dt = RollList_GetDateTime(idx, filmPosition);
......
......@@ -952,7 +952,7 @@ namespace FLY.Thick.Blowing.Server
int ret = GetAgo(dt, out DateTime ago_dt, out int ago_index);
if (ret != 0)
if (ret > 0)
return ret;//发生在未来不处理!!!
......@@ -1039,7 +1039,13 @@ namespace FLY.Thick.Blowing.Server
int GetAgo(DateTime dt, out DateTime ago_dt, out int ago_index)
{
if (Is3D)
return GetAgo3D(dt, out ago_dt, out ago_index);
{
int ret = GetAgo3D(dt, out ago_dt, out ago_index);
if (ret != -1) return ret;
//发生在过去的,顺便猜个值出来
return GetAgoFix(dt, out ago_dt, out ago_index);
}
else
return GetAgoFix(dt, out ago_dt, out ago_index);
}
......@@ -1094,6 +1100,8 @@ namespace FLY.Thick.Blowing.Server
int beginIndex = (int)((filmPosition - FilmLength) / MofR);
if (beginIndex < 0)
return -1;//发生在过去,什么都不干
int index0;
int index1;
index = RollList_FindIndex3d24mPre(beginIndex, filmPosition);
......@@ -1252,6 +1260,12 @@ namespace FLY.Thick.Blowing.Server
/// <param name="angle">输出 旋转角度</param>
bool GetAngle(DateTime dt, out double angle)
{
if (dt == DateTime.MinValue)
{
angle = 0;
return false;
}
//不修改旋转速度!!!!!!!!!!!!
bool ret = GetAngle(dt, false, out angle, out DIRECTION direction, out int rotationCnt, out bool inCV);
if (ret == false)
......@@ -1513,12 +1527,16 @@ namespace FLY.Thick.Blowing.Server
{
idx = 0;
dt = DateTime.MinValue;
if (filmPosition < 0)
return -1;
if (mRollList.Count == 0)
return 1;
if (filmPosition < 0)
{
//发生在过去。 只能猜
dt = RollList_GetDateTime(idx, filmPosition);
return -1;
}
idx = (int)(filmPosition / MofR);
if (idx >= mRollList.Count - 1)
{
......@@ -1745,6 +1763,11 @@ namespace FLY.Thick.Blowing.Server
//压扁对面的角度
double a_other = 360 - a;
if (dt == DateTime.MinValue)
{
return false;
}
//不修改旋转速度!!!!!!!!!!!!
bool ret = GetAngle(dt, false, out double angle, out direction, out rotationCnt, out inCV);
if (ret == false)
......
和美安装包_v6.30.1 -20210713
1. 修复 刚开机没有辊速度记录,就没有图
和美安装包_v6.30.0 -20210705
1. 修改 追边测厚仪360, 360°连续旋转的旋转架 可以使用编码器,接的信号还是i9,i10
2. 添加 全部测厚仪 旋转信号0,1,辊速信号 可以自定义
......
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