Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hemei
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
hemei
Commits
096db404
Commit
096db404
authored
Jan 11, 2022
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 限制分区序号范围,解决之前的 org_thicks[boltindex] 溢出问题
parent
4eb6fa2a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
12 deletions
+20
-12
BlowingDetect.cs
...Y.Thick.Blowing/FLY.Thick.Blowing/Server/BlowingDetect.cs
+6
-6
GM_BlowingScan.cs
...lowingScan/FLY.Thick.BlowingScan/Server/GM_BlowingScan.cs
+14
-6
No files found.
Project.FLY.Thick.Blowing/FLY.Thick.Blowing/Server/BlowingDetect.cs
View file @
096db404
...
...
@@ -116,17 +116,17 @@ namespace FLY.Thick.Blowing.Server
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认9-1
/// </summary>
public
int
InNo_Limit0
{
get
;
set
;
}
=
FlyADIODefine
.
Instance
.
InNo_Limit0
;
public
int
InNo_Limit0
{
get
;
set
;
}
=
9
-
1
;
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认10-1
/// </summary>
public
int
InNo_Limit1
{
get
;
set
;
}
=
FlyADIODefine
.
Instance
.
InNo_Limit
1
;
public
int
InNo_Limit1
{
get
;
set
;
}
=
10
-
1
;
/// <summary>
/// 自定义 辊速度 输入口序号 从0开始 默认11-1
/// </summary>
public
int
InNo_Roll
{
get
;
set
;
}
=
FlyADIODefine
.
Instance
.
InNo_Roll
;
public
int
InNo_Roll
{
get
;
set
;
}
=
11
-
1
;
#
endregion
#
region
状态
...
...
@@ -1729,8 +1729,8 @@ namespace FLY.Thick.Blowing.Server
/// </summary>
/// <param name="a">与0°的偏移, 0~180</param>
/// <param name="dt">时间点</param>
/// <param name="angle0">上面的膜对应的膜角度</param>
/// <param name="angle1">下面的膜对应的膜角度</param>
/// <param name="angle0">上面的膜对应的膜角度
[0~360)
</param>
/// <param name="angle1">下面的膜对应的膜角度
[0~360)
</param>
/// <param name="direction">人字架正转?反转? FIX, 停止!</param>
/// <param name="rotationCnt">扫描次数</param>
/// <param name="inCV">在恒速阶段</param>
...
...
Project.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan/Server/GM_BlowingScan.cs
View file @
096db404
...
...
@@ -226,7 +226,12 @@ namespace FLY.Thick.BlowingScan.Server
}
}
/// <summary>
/// 角度转分区序号, 角度范围[0~360°)
/// </summary>
/// <param name="a">膜泡角度[0~360°)</param>
/// <param name="orgboltno">复位区号</param>
/// <returns></returns>
int
GetBoltIndexFromAngle
(
double
a
,
int
orgboltno
)
{
int
boltno1st
=
1
;
...
...
@@ -235,8 +240,11 @@ namespace FLY.Thick.BlowingScan.Server
boltindex
+=
orgboltno
-
boltno1st
;
if
(
boltindex
>=
nbolts
)
boltindex
-=
nbolts
;
//100%确保输出的序号在有效范围内
while
(
boltindex
<
0
)
boltindex
+=
nbolts
;
//正常情况不会调用
while
(
boltindex
>=
nbolts
)
boltindex
-=
nbolts
;
//极端情况,a=360.2°, 这个会调用2次
return
boltindex
;
}
...
...
@@ -1137,7 +1145,7 @@ namespace FLY.Thick.BlowingScan.Server
int
pos
=
i
*
posOfGrid
+
posOfGrid
/
2
;
//一个grid的中间脉冲,也就是大概而已
double
thk
=
double
.
NaN
;
if
(
Misc
.
MyBase
.
ISVALIDATA
(
dat
[
idx
]))
if
(
!
double
.
IsNaN
(
dat
[
idx
]))
thk
=
Ad2Thk
(
dat
[
idx
])
*
2
;
pos
-=
scaninfocell
.
beginPos
;
//膜上面的位置
...
...
@@ -1525,7 +1533,7 @@ namespace FLY.Thick.BlowingScan.Server
if
(
double
.
IsNaN
(
avg
))
//平均值不合法!!!!
return
false
;
if
(
avg
<
5
00
)
//值
太小!!!
if
(
avg
<
5
)
//小于5um ,
太小!!!
return
false
;
List
<
EquationCell
>
equationlist
=
new
List
<
EquationCell
>();
...
...
@@ -1699,7 +1707,7 @@ namespace FLY.Thick.BlowingScan.Server
{
//失败,删除!!!
for
(
int
i
=
0
;
i
<
scaninfo
.
thks
.
Count
();
i
++)
scaninfo
.
thks
[
i
]
=
Misc
.
MyBase
.
NULL_VALUE
;
scaninfo
.
thks
[
i
]
=
double
.
NaN
;
}
scaninfo
.
lockbm
=
true
;
return
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment