Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO827-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8a38b111
由
LN
编写于
2021-05-18 15:55:32 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
扫码算法更新
1 个父辈
bcd97ca1
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
28 行增加
和
14 行删除
dll/eyemLib.dll
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
source/DeviceLibrary/eyemLib.dll
dll/eyemLib.dll
查看文件 @
8a38b11
此文件类型无法预览
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
8a38b11
...
@@ -135,27 +135,36 @@ namespace OnlineStore.DeviceLibrary
...
@@ -135,27 +135,36 @@ namespace OnlineStore.DeviceLibrary
CloseCamera
(
cameraName
);
CloseCamera
(
cameraName
);
continue
;
continue
;
}
}
LogUtil
.
debug
(
deviceName
+
" 【"
+
cameraName
+
"】取图片完成,开始扫码"
);
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】取图片完成,开始扫码"
);
string
r
=
""
;
string
r
=
""
;
List
<
CodeInfo
>
tlci
=
EyemDecode
.
ModelDecoder
(
ref
bmp
);
bool
eyemNoCode
=
false
;
bool
eyemNoCode
=
false
;
foreach
(
CodeInfo
code
in
tlci
)
Task
eyemtask
=
Task
.
Factory
.
StartNew
(
delegate
{
{
List
<
CodeInfo
>
tlci
=
EyemDecode
.
ModelDecoder
(
ref
bmp
);
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】[eyemDecode]"
+
code
.
CodeType
+
"(X: "
+
code
.
X
+
",Y: "
+
code
.
Y
+
") "
+
code
.
CodeStr
);
foreach
(
CodeInfo
code
in
tlci
)
string
str
=
CodeManager
.
ReplaceCode
(
code
.
CodeStr
);
if
(!
codeList
.
Contains
(
str
))
{
{
codeList
.
Add
(
s
tr
);
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】[eyemDecode]"
+
code
.
CodeType
+
"(X: "
+
code
.
X
+
",Y: "
+
code
.
Y
+
") "
+
code
.
CodeS
tr
);
r
=
r
+
"##eyem|"
+
code
.
CodeType
+
"|"
+
str
;
string
str
=
CodeManager
.
ReplaceCode
(
code
.
CodeStr
)
;
if
(!
findRightCode
)
if
(!
codeList
.
Contains
(
str
)
)
{
{
findRightCode
=
HasRightCode
(
str
);
codeList
.
Add
(
str
);
r
=
r
+
"##eyem|"
+
code
.
CodeType
+
"|"
+
str
;
if
(!
findRightCode
)
{
findRightCode
=
HasRightCode
(
str
);
}
}
}
}
}
});
//最多等待60秒
bool
taskResult
=
eyemtask
.
Wait
(
60000
);
if
(!
taskResult
)
{
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】eyem扫码超时"
);
eyemNoCode
=
true
;
}
}
if
(!
isPreScan
)
if
(!
isPreScan
)
{
{
if
(!
findRightCode
)
if
(!
findRightCode
)
...
@@ -199,10 +208,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -199,10 +208,15 @@ namespace OnlineStore.DeviceLibrary
//如果halcon没扫出的,
//如果halcon没扫出的,
string
nameStr
=
""
;
string
nameStr
=
""
;
if
(
findRightCode
&&
eyemNoCode
)
if
(
findRightCode
&&
eyemNoCode
)
{
{
nameStr
=
"eyem"
;
nameStr
=
"eyem"
;
}
}
if
(!
taskResult
)
{
nameStr
=
"eyemTimeOut"
;
}
SaveImageToFile
(
deviceName
,
cameraName
+
nameStr
,
bmp
);
SaveImageToFile
(
deviceName
,
cameraName
+
nameStr
,
bmp
);
}
}
}
}
...
...
source/DeviceLibrary/eyemLib.dll
查看文件 @
8a38b11
此文件类型无法预览
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论