Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO908-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4a5f2091
由
张东亮
编写于
2022-11-01 16:46:38 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
20221101
1 个父辈
47d45d7d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
77 行增加
和
43 行删除
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Camera.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_PosDebug.cs
source/XLRStoreClient/boxForm/FrmPosDebug.Designer.cs
source/XLRStoreClient/boxForm/FrmPosDebug.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Camera.cs
查看文件 @
4a5f209
...
...
@@ -62,23 +62,23 @@ namespace OnlineStore.DeviceLibrary
{
Bitmap
bmp
=
AcqImage
(
name
);
if
(
bmp
!=
null
)
{
if
(
IsRecord
)
{
cnt
++;
Task
.
Factory
.
StartNew
(
delegate
{
SaveImage
(
"box_A"
,
cnt
);
});
Task
.
Factory
.
StartNew
(
delegate
{
SaveImage
(
"box_B"
,
cnt
);
});
if
((
DateTime
.
Now
-
dateTime
).
TotalMinutes
>
2
)
StopRecord
();
}
//
{
//
if (IsRecord)
//
{
//
cnt++;
//
Task.Factory.StartNew(delegate
//
{
//
SaveImage("box_A", cnt);
//
});
//
Task.Factory.StartNew(delegate
//
{
//
SaveImage("box_B", cnt);
//
});
//
if ((DateTime.Now - dateTime).TotalMinutes > 2)
//
StopRecord();
//
}
camera_event
?.
Invoke
(
new
CameraArgs
(
name
,
bmp
));
}
//
}
Thread
.
Sleep
(
300
);
}
}
...
...
@@ -207,23 +207,23 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
void
StartRecord
(
bool
isTest
=
false
)
{
if
(
isTest
)
{
inOutPosInfo
=
new
InOutPosInfo
(
"code"
+
DateTime
.
Now
.
ToString
(
"mmssfff"
),
DateTime
.
Now
.
ToString
(
"yyyyMMddhh"
));
}
else
{
inOutPosInfo
=
MoveInfo
.
MoveParam
.
PosInfo
.
ToCopy
();
}
cnt
=
0
;
string
inputfolderA
=
Application
.
StartupPath
+
imgPath
+
"box_A\\"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
)
+
"\\"
+
inOutPosInfo
.
PosId
;
string
inputfolderB
=
Application
.
StartupPath
+
imgPath
+
"box_B\\"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
)
+
"\\"
+
inOutPosInfo
.
PosId
;
string
outputfolderA
=
Application
.
StartupPath
+
"\\Videos\\box_A\\"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
)
+
"\\"
+
inOutPosInfo
.
PosId
;
string
outputfolderB
=
Application
.
StartupPath
+
"\\Videos\\box_B\\"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
)
+
"\\"
+
inOutPosInfo
.
PosId
;
ffmpegA
.
SetParam
(
inputfolderA
,
outputfolderA
,
$
"{DateTime.Now.ToString("
hhmmss
")}_{inOutPosInfo.barcode}.mp4"
);
ffmpegB
.
SetParam
(
inputfolderB
,
outputfolderB
,
$
"{DateTime.Now.ToString("
hhmmss
")}_{inOutPosInfo.barcode}.mp4"
);
dateTime
=
DateTime
.
Now
;
IsRecord
=
true
;
//
if (isTest)
//
{
//
inOutPosInfo = new InOutPosInfo("code" + DateTime.Now.ToString("mmssfff"), DateTime.Now.ToString("yyyyMMddhh"));
//
}
//
else
//
{
//
inOutPosInfo = MoveInfo.MoveParam.PosInfo.ToCopy();
//
}
//
cnt = 0;
//
string inputfolderA = Application.StartupPath + imgPath + "box_A\\" + DateTime.Now.ToString("yyyyMMdd") + "\\" + inOutPosInfo.PosId;
//
string inputfolderB = Application.StartupPath + imgPath + "box_B\\" + DateTime.Now.ToString("yyyyMMdd") + "\\" + inOutPosInfo.PosId;
//
string outputfolderA = Application.StartupPath + "\\Videos\\box_A\\" + DateTime.Now.ToString("yyyyMMdd") + "\\" + inOutPosInfo.PosId;
//
string outputfolderB = Application.StartupPath + "\\Videos\\box_B\\" + DateTime.Now.ToString("yyyyMMdd") + "\\" + inOutPosInfo.PosId;
//
ffmpegA.SetParam(inputfolderA, outputfolderA, $"{DateTime.Now.ToString("hhmmss")}_{inOutPosInfo.barcode}.mp4");
//
ffmpegB.SetParam(inputfolderB, outputfolderB, $"{DateTime.Now.ToString("hhmmss")}_{inOutPosInfo.barcode}.mp4");
//
dateTime = DateTime.Now;
//
IsRecord = true;
}
/// <summary>
/// 停止记录
...
...
@@ -233,9 +233,9 @@ namespace OnlineStore.DeviceLibrary
if
(!
IsRecord
)
return
;
IsRecord
=
false
;
LogUtil
.
info
(
"监控视频开始转换"
);
Task
task1
=
ffmpegA
.
ConvertImgsToMp4
();
Task
task2
=
ffmpegB
.
ConvertImgsToMp4
();
//
LogUtil.info("监控视频开始转换");
//
Task task1 = ffmpegA.ConvertImgsToMp4();
//
Task task2 = ffmpegB.ConvertImgsToMp4();
//Task.WaitAll(new Task[] { task1, task2 }, TimeSpan.FromMinutes(1));
//LogUtil.info("监控视频转换完成");
}
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_PosDebug.cs
查看文件 @
4a5f209
...
...
@@ -95,6 +95,8 @@ namespace OnlineStore.DeviceLibrary
{
return
;
}
if
(
posDebugInfo
.
IsPause
)
return
;
switch
(
MoveInfo
.
MoveStep
)
{
case
StepEnum
.
SP_00_1_StartPosDebug
:
...
...
@@ -443,6 +445,7 @@ namespace OnlineStore.DeviceLibrary
/// 停止调试
/// </summary>
public
bool
IsBreak
{
get
;
set
;
}
=
false
;
public
bool
IsPause
{
get
;
set
;
}
=
false
;
/// <summary>
/// 是否是最后一个抽屉
/// </summary>
...
...
@@ -481,13 +484,19 @@ namespace OnlineStore.DeviceLibrary
if
(
CurColInDrawer
<
config
.
Cols_In_Drawer
)
{
PreColInDrawer
=
CurColInDrawer
;
CurColInDrawer
++;
if
(
CurColInDrawer
==
2
)
CurColInDrawer
=
17
;
else
CurColInDrawer
++;
}
else
{
PreRowInDrawer
=
CurRowInDrawer
;
PreColInDrawer
=
CurColInDrawer
;
CurRowInDrawer
++;
if
(
CurRowInDrawer
==
1
)
CurRowInDrawer
=
3
;
else
CurRowInDrawer
++;
}
}
else
//轴在目标层
...
...
@@ -495,7 +504,10 @@ namespace OnlineStore.DeviceLibrary
if
(
CurColInDrawer
<
EndColInDrawer
)
{
PreColInDrawer
=
CurColInDrawer
;
CurColInDrawer
++;
if
(
CurColInDrawer
==
2
)
CurColInDrawer
=
17
;
else
CurColInDrawer
++;
}
}
}
...
...
@@ -505,7 +517,10 @@ namespace OnlineStore.DeviceLibrary
if
(
CurColInDrawer
==
config
.
Cols_In_Drawer
)
{
PreColInDrawer
=
CurColInDrawer
;
CurColInDrawer
--;
if
(
CurColInDrawer
==
17
)
CurColInDrawer
=
2
;
else
CurColInDrawer
--;
}
else
if
(
CurColInDrawer
==
1
)
{
...
...
@@ -520,13 +535,19 @@ namespace OnlineStore.DeviceLibrary
if
(
CurColInDrawer
>
1
)
{
PreColInDrawer
=
CurColInDrawer
;
CurColInDrawer
--;
if
(
CurColInDrawer
==
17
)
CurColInDrawer
=
2
;
else
CurColInDrawer
--;
}
else
{
PreRowInDrawer
=
CurRowInDrawer
;
PreColInDrawer
=
CurColInDrawer
;
CurRowInDrawer
++;
if
(
CurRowInDrawer
==
1
)
CurRowInDrawer
=
3
;
else
CurRowInDrawer
++;
}
}
else
//轴在目标层
...
...
@@ -534,7 +555,10 @@ namespace OnlineStore.DeviceLibrary
if
(
CurColInDrawer
>
EndColInDrawer
)
{
PreColInDrawer
=
CurColInDrawer
;
CurColInDrawer
--;
if
(
CurColInDrawer
==
17
)
CurColInDrawer
=
2
;
else
CurColInDrawer
--;
}
}
}
...
...
source/XLRStoreClient/boxForm/FrmPosDebug.Designer.cs
查看文件 @
4a5f209
此文件的差异被折叠,
点击展开。
source/XLRStoreClient/boxForm/FrmPosDebug.cs
查看文件 @
4a5f209
...
...
@@ -114,5 +114,15 @@ namespace OnlineStore.XLRStore
LogUtil
.
error
(
"打开行走机构循环测试时出错:"
,
ex
);
}
}
private
void
button3_Click
(
object
sender
,
EventArgs
e
)
{
boxEquip
.
posDebugInfo
.
IsPause
=
false
;
}
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
{
boxEquip
.
posDebugInfo
.
IsPause
=
true
;
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论