Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit cb9f8646
由
几米阳光
编写于
2019-02-20 16:10:27 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
扫码改为保存到本地再扫码
1 个父辈
02005535
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
20 行增加
和
6 行删除
dll/CodeLibrary.dll
source/ACSingleStore/App.config
source/DeviceLibrary/halcon/CodeManager.cs
dll/CodeLibrary.dll
查看文件 @
cb9f864
此文件类型无法预览
source/ACSingleStore/App.config
查看文件 @
cb9f864
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<!--出库等待料盘拿走的时间,秒-->
<!--出库等待料盘拿走的时间,秒-->
<
add
key
=
"OutStoreWaitSeconds"
value
=
"600"
/>
<
add
key
=
"OutStoreWaitSeconds"
value
=
"600"
/>
<!--压紧轴对应
1
mm
的脉冲-->
<!--压紧轴对应
4
mm
的脉冲-->
<
add
key
=
"ComAxisChangeValue"
value
=
"2400"
/>
<
add
key
=
"ComAxisChangeValue"
value
=
"2400"
/>
</
appSettings
>
</
appSettings
>
<
log4net
>
<
log4net
>
...
...
source/DeviceLibrary/halcon/CodeManager.cs
查看文件 @
cb9f864
...
@@ -128,20 +128,34 @@ namespace OnlineStore.DeviceLibrary
...
@@ -128,20 +128,34 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】获取图片完成,开始转换图片"
);
HObject
ho_Image
=
HDCodeHelper
.
Bitmap2HObjectBpp24
(
bitmap
);
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】获取图片完成"
);
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】转换图片完成,开始扫码"
);
string
path
=
Application
.
StartupPath
+
@"\CodeImage\"
;
string
filePath
=
path
+
@"code.png"
;
if
(
File
.
Exists
(
filePath
))
{
File
.
Delete
(
filePath
);
}
if
(!
Directory
.
Exists
(
path
))
{
Directory
.
CreateDirectory
(
path
);
}
bitmap
.
Save
(
filePath
);
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】图片已保存到:"
+
filePath
);
//HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap);
//LogUtil.info(" 摄像机【" + cameraName + "】转换图片完成,开始扫码");
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
foreach
(
string
codeType
in
codeTypeList
)
foreach
(
string
codeType
in
codeTypeList
)
{
{
//判断是否是一维码
//判断是否是一维码
if
(
codeType
.
ToLower
().
Equals
(
"barcode"
))
if
(
codeType
.
ToLower
().
Equals
(
"barcode"
))
{
{
cc
=
HDCodeHelper
.
DecodeBarCode
(
ho_Image
);
cc
=
HDCodeHelper
.
DecodeBarCode
(
filePath
);
}
}
else
else
{
{
cc
=
HDCodeHelper
.
DecodeCode
(
ho_Image
,
1
,
GetCodeParamFilePath
(
codeType
),
codeType
);
cc
=
HDCodeHelper
.
DecodeCode
(
filePath
,
1
,
GetCodeParamFilePath
(
codeType
),
codeType
);
}
}
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】【"
+
codeType
+
"】扫码完成"
);
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】【"
+
codeType
+
"】扫码完成"
);
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论