Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6c4a00d4
由
几米阳光
编写于
2019-05-10 15:28:13 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
FA开头的二维码,默认为7*32
1 个父辈
718052d4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
25 行增加
和
23 行删除
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/记录.txt
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/halcon/CodeManager.cs
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
6c4a00d
...
@@ -993,14 +993,13 @@ namespace OnlineStore.ACSingleStore
...
@@ -993,14 +993,13 @@ namespace OnlineStore.ACSingleStore
private
void
扫码测试
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
private
void
扫码测试
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
{
store
.
KNDIOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
HIGH
);
store
.
KNDIOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
HIGH
);
string
message
=
""
;
string
message
=
""
;
string
outMsg
=
""
;
List
<
string
>
codeList
=
CodeManager
.
CameraScan
();
List
<
string
>
codeList
=
CodeManager
.
CameraScan
();
foreach
(
string
str
in
codeList
)
foreach
(
string
str
in
codeList
)
{
{
message
=
message
+
str
+
"##"
;
message
=
message
+
str
+
"##"
;
}
}
LogUtil
.
info
(
"扫码测试收到二维码
【"
+
outMsg
+
"】
:"
+
message
);
LogUtil
.
info
(
"扫码测试收到二维码
:"
+
message
);
store
.
KNDIOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
LOW
);
store
.
KNDIOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
LOW
);
}
}
...
...
source/ACSingleStore/记录.txt
查看文件 @
6c4a00d
...
@@ -73,6 +73,7 @@
...
@@ -73,6 +73,7 @@
20190505
20190505
温湿度功能修改,增加温湿度报警显示。
温湿度功能修改,增加温湿度报警显示。
FA开头的二维码,默认为7*32
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
6c4a00d
...
@@ -1487,16 +1487,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1487,16 +1487,7 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
info
(
"上次扫码还未执行完毕,请稍后!"
);
LogUtil
.
info
(
"上次扫码还未执行完毕,请稍后!"
);
return
;
return
;
}
}
//if (scanTimer == null)
//{
// scanTimer = new System.Timers.Timer();
// scanTimer.Interval = 10;
// scanTimer.AutoReset = false;
// scanTimer.Enabled = false;
// scanTimer.Elapsed += scanTimer_Elapsed;
//}
//scanTimer.Enabled = true;
Task
.
Factory
.
StartNew
(
delegate
{
scanTimer_Elapsed
(
null
,
null
);
});
Task
.
Factory
.
StartNew
(
delegate
{
scanTimer_Elapsed
(
null
,
null
);
});
}
}
...
@@ -1520,7 +1511,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1520,7 +1511,14 @@ namespace OnlineStore.DeviceLibrary
foreach
(
string
str
in
codeList
)
foreach
(
string
str
in
codeList
)
{
{
string
code
=
str
;
string
code
=
str
;
code
=
"=1+0x0-7x"
+
height
+
"="
+
code
;
if
(
str
.
ToUpper
().
StartsWith
(
"FA"
))
{
code
=
"=1+0x0-7x32"
+
"="
+
code
;
}
else
{
code
=
"=1+0x0-7x"
+
height
+
"="
+
code
;
}
message
=
message
+
code
+
spiltStr
;
message
=
message
+
code
+
spiltStr
;
}
}
if
(!
outMsg
.
Equals
(
""
))
if
(!
outMsg
.
Equals
(
""
))
...
...
source/DeviceLibrary/halcon/CodeManager.cs
查看文件 @
6c4a00d
...
@@ -147,7 +147,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -147,7 +147,7 @@ namespace OnlineStore.DeviceLibrary
public
static
List
<
string
>
CameraScan
()
public
static
List
<
string
>
CameraScan
()
{
{
List
<
string
>
codeList
=
new
List
<
string
>();
List
<
string
>
codeList
=
new
List
<
string
>();
List
<
CodeInfo
>
allCodeList
=
new
List
<
CodeInfo
>();
//
List<CodeInfo> allCodeList = new List<CodeInfo>();
try
try
{
{
...
@@ -178,9 +178,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -178,9 +178,17 @@ namespace OnlineStore.DeviceLibrary
{
{
cc
=
HDCodeHelper
.
DecodeCode
(
ho_Image
,
1
,
GetCodeParamFilePath
(
codeType
),
codeType
);
cc
=
HDCodeHelper
.
DecodeCode
(
ho_Image
,
1
,
GetCodeParamFilePath
(
codeType
),
codeType
);
}
}
//LogUtil.info(" 摄像机【" + cameraName + "】【"+ codeType + "】扫码完成");
if
(
cc
.
Count
>
0
)
}
{
allCodeList
.
AddRange
(
cc
);
string
r
=
""
;
foreach
(
CodeInfo
c
in
cc
)
{
codeList
.
Add
(
c
.
CodeStr
);
r
=
r
+
"##"
+
c
.
CodeStr
;
}
LogUtil
.
info
(
" 【"
+
cameraName
+
"】【"
+
codeType
+
"】扫码完成:"
+
r
);
}
}
}
}
}
}
}
}
...
@@ -192,11 +200,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -192,11 +200,7 @@ namespace OnlineStore.DeviceLibrary
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
"扫码出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"扫码出错:"
+
ex
.
ToString
());
}
}
foreach
(
CodeInfo
info
in
allCodeList
)
{
codeList
.
Add
(
info
.
CodeStr
);
}
return
codeList
;
return
codeList
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论