Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
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
潘栩锋
Thick-Common
Commits
bf850c30
Commit
bf850c30
authored
Mar 07, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
边界查找,没有任何数据输入,会报警提示
parent
55a18e0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
BorderSearch.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/BorderSearch.cs
+16
-4
No files found.
Project.FLY.Thick.Base/FLY.Thick.Base/Server/BorderSearch.cs
View file @
bf850c30
...
...
@@ -15,6 +15,11 @@ namespace FLY.Thick.Base.Server
/// </summary>
public
class
BorderSearch
:
IBorderSearchService
,
INotifyPropertyChanged
,
Misc
.
ISaveToXml
{
/// <summary>
/// 报警测试
/// </summary>
public
static
FLY
.
OBJComponents
.
Common
.
ERRNO
BORDER_ERRNO_NOFILM
=
new
FLY
.
OBJComponents
.
Common
.
ERRNO
()
{
Code
=
50
,
Descrption
=
"边界异常,没有被测物"
};
#
region
延时执行,
Markno
public
const
int
MARKNO_SAVE
=
1
;
#
endregion
...
...
@@ -124,6 +129,7 @@ namespace FLY.Thick.Base.Server
#
endregion
OBJComponents
.
Server
.
WarningSystem
warningSystem
;
private
string
param_path
=
"bordersearch.xml"
;
public
BorderSearch
()
{
...
...
@@ -151,6 +157,11 @@ namespace FLY.Thick.Base.Server
};
Load
();
}
public
void
Init
(
OBJComponents
.
Server
.
WarningSystem
warningSystem
)
{
this
.
warningSystem
=
warningSystem
;
}
void
Default
()
{
Enable
=
false
;
...
...
@@ -589,8 +600,10 @@ namespace FLY.Thick.Base.Server
int
borderend_grid
;
//validend_grid;
if
(!
FindFilm_Threshold
(
dat
,
validbegin_grid
,
validend_grid
,
TempAD
,
TempRange
,
out
borderbegin_grid
,
out
borderend_grid
))
{
warningSystem
.
Add
(
BORDER_ERRNO_NOFILM
.
Code
,
BORDER_ERRNO_NOFILM
.
Descrption
,
OBJComponents
.
Common
.
ERR_STATE
.
ON
);
return
false
;
}
//N2 只是用来判断一下膜够不够宽而已,没用
int
N2_grid
=
(
N2
*
3
+
SensorWidth
)
/
posOfGrid
;
...
...
@@ -605,9 +618,8 @@ namespace FLY.Thick.Base.Server
FindFilm_Break
(
dat
,
sensor_grid
,
filter_grid
,
ref
borderbegin_grid
,
ref
borderend_grid
);
}
int
idx
=
0
;
if
(
direction
==
DIRECTION
.
BACKWARD
)
idx
=
1
;
int
idx
=
(
direction
==
DIRECTION
.
FORWARD
)
?
0
:
1
;
//转为 脉冲
border
[
idx
].
Begin
=
(
borderbegin_grid
+
gridBegin
)
*
posOfGrid
;
border
[
idx
].
End
=
(
borderend_grid
+
gridBegin
)
*
posOfGrid
;
...
...
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