Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
SmartShelf
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1e8ce892
由
LN
编写于
2020-09-02 13:15:17 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
三色灯闪烁bug修改
1 个父辈
6a18db82
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
54 行增加
和
25 行删除
DeviceLibrary/DeviceLibrary/led/BaseLEDManager.cs
DeviceLibrary/manager/BOXManager.cs
SmartShelf/FrmStore.Designer.cs
SmartShelf/FrmStore.cs
SmartShelf/记录.txt
DeviceLibrary/DeviceLibrary/led/BaseLEDManager.cs
查看文件 @
1e8ce89
...
...
@@ -72,21 +72,24 @@ namespace SmartShelf.DeviceLibrary
}
}
}
/// <summary>
/// 1=绿灯,2=黄灯
/// </summary>
public
static
int
CurrLedStatus
=
-
1
;
///
//
<summary>
///
//
1=绿灯,2=黄灯
///
//
</summary>
//
public static int CurrLedStatus = -1;
public
static
List
<
int
>
StatusLedDmx
=
new
List
<
int
>();
public
static
string
statusMsg
=
""
;
public
static
void
UpdateStatusLights
(
Dictionary
<
string
,
string
>
dataMap
)
{
statusMsg
=
""
;
Dictionary
<
string
,
List
<
Light
>>
lightsMap
=
new
Dictionary
<
string
,
List
<
Light
>>();
List
<
string
>
ipDmx
=
new
List
<
string
>(
dataMap
.
Keys
);
foreach
(
string
key
in
ipDmx
)
{
string
color
=
dataMap
[
key
];
statusMsg
+=
"["
+
key
+
"="
+
color
+
"]"
;
string
[]
array
=
key
.
Split
(
'_'
);
if
(
array
.
Length
==
2
)
{
...
...
@@ -99,22 +102,22 @@ namespace SmartShelf.DeviceLibrary
{
if
(
"green"
.
Equals
(
color
))
{
CurrLedStatus
=
1
;
//
CurrLedStatus = 1;
sLed
.
Add
(
Light
.
GreenLight
(
dmx
,
index
));
}
else
if
(
"yellow"
.
Equals
(
color
))
{
CurrLedStatus
=
2
;
//
CurrLedStatus = 2;
sLed
.
Add
(
Light
.
YellowLight
(
dmx
,
index
));
}
else
if
(
"red"
.
Equals
(
color
))
{
CurrLedStatus
=
2
;
//
CurrLedStatus = 2;
sLed
.
Add
(
Light
.
RedLight
(
dmx
,
index
));
}
else
{
CurrLedStatus
=
0
;
//
CurrLedStatus = 0;
sLed
.
Add
(
Light
.
CloseLight
(
dmx
,
index
));
}
}
...
...
@@ -132,7 +135,7 @@ namespace SmartShelf.DeviceLibrary
List
<
Light
>
lights
=
lightsMap
[
dip
];
if
(
lights
.
Count
>
0
)
{
LEDManager
.
GetLedModule
(
dip
).
LightO
ff
(
lights
.
ToArray
());
LEDManager
.
GetLedModule
(
dip
).
LightO
n
(
lights
.
ToArray
());
Thread
.
Sleep
(
50
);
}
}
...
...
DeviceLibrary/manager/BOXManager.cs
查看文件 @
1e8ce89
...
...
@@ -124,7 +124,7 @@ namespace SmartShelf.DeviceLibrary
{
timersTimer
=
new
System
.
Timers
.
Timer
();
timersTimer
.
Enabled
=
false
;
timersTimer
.
Interval
=
1
5
00
;
timersTimer
.
Interval
=
1
0
00
;
timersTimer
.
Elapsed
+=
timersTimer_Elapsed
;
timersTimer
.
AutoReset
=
true
;
...
...
@@ -232,7 +232,7 @@ namespace SmartShelf.DeviceLibrary
List
<
string
>
keys
=
new
List
<
string
>(
StatusLedColorMap
.
Keys
);
foreach
(
string
key
in
keys
)
{
if
(
shanShuoLed
.
Contains
(
key
))
...
...
SmartShelf/FrmStore.Designer.cs
查看文件 @
1e8ce89
...
...
@@ -75,6 +75,7 @@
this
.
txtIp2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label6
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
linkLabel1
=
new
System
.
Windows
.
Forms
.
LinkLabel
();
this
.
groupBox2
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
numYu
)).
BeginInit
();
this
.
groupBox1
.
SuspendLayout
();
...
...
@@ -111,7 +112,7 @@
this
.
groupBox2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
5
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
3
49
,
194
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
3
64
,
194
);
this
.
groupBox2
.
TabIndex
=
106
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"库位操作测试"
;
...
...
@@ -262,7 +263,7 @@
// button5
//
this
.
button5
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
button5
.
Location
=
new
System
.
Drawing
.
Point
(
1
27
,
21
);
this
.
button5
.
Location
=
new
System
.
Drawing
.
Point
(
1
06
,
22
);
this
.
button5
.
Name
=
"button5"
;
this
.
button5
.
Size
=
new
System
.
Drawing
.
Size
(
95
,
35
);
this
.
button5
.
TabIndex
=
112
;
...
...
@@ -273,7 +274,7 @@
// btnCloseSLed
//
this
.
btnCloseSLed
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnCloseSLed
.
Location
=
new
System
.
Drawing
.
Point
(
2
28
,
21
);
this
.
btnCloseSLed
.
Location
=
new
System
.
Drawing
.
Point
(
2
04
,
22
);
this
.
btnCloseSLed
.
Name
=
"btnCloseSLed"
;
this
.
btnCloseSLed
.
Size
=
new
System
.
Drawing
.
Size
(
95
,
35
);
this
.
btnCloseSLed
.
TabIndex
=
111
;
...
...
@@ -284,7 +285,7 @@
// btnOpenSLed
//
this
.
btnOpenSLed
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOpenSLed
.
Location
=
new
System
.
Drawing
.
Point
(
26
,
21
);
this
.
btnOpenSLed
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
22
);
this
.
btnOpenSLed
.
Name
=
"btnOpenSLed"
;
this
.
btnOpenSLed
.
Size
=
new
System
.
Drawing
.
Size
(
95
,
35
);
this
.
btnOpenSLed
.
TabIndex
=
110
;
...
...
@@ -375,7 +376,7 @@
this
.
lblData
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblData
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
618
);
this
.
lblData
.
Name
=
"lblData"
;
this
.
lblData
.
Size
=
new
System
.
Drawing
.
Size
(
3
49
,
179
);
this
.
lblData
.
Size
=
new
System
.
Drawing
.
Size
(
3
64
,
179
);
this
.
lblData
.
TabIndex
=
109
;
this
.
lblData
.
Text
=
"label4"
;
this
.
lblData
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
...
...
@@ -386,9 +387,9 @@
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox1
.
Controls
.
Add
(
this
.
panel1
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
3
59
,
4
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
3
74
,
4
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
7
40
,
797
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
7
25
,
797
);
this
.
groupBox1
.
TabIndex
=
1
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"亮灯信息"
;
...
...
@@ -401,7 +402,7 @@
this
.
panel1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
22
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
7
34
,
772
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
7
19
,
772
);
this
.
panel1
.
TabIndex
=
0
;
//
// lblLedInfo
...
...
@@ -413,7 +414,7 @@
this
.
lblLedInfo
.
ForeColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
lblLedInfo
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
6
);
this
.
lblLedInfo
.
Name
=
"lblLedInfo"
;
this
.
lblLedInfo
.
Size
=
new
System
.
Drawing
.
Size
(
7
28
,
765
);
this
.
lblLedInfo
.
Size
=
new
System
.
Drawing
.
Size
(
7
13
,
765
);
this
.
lblLedInfo
.
TabIndex
=
0
;
this
.
lblLedInfo
.
Text
=
"?"
;
//
...
...
@@ -440,7 +441,7 @@
this
.
groupTest
.
Controls
.
Add
(
this
.
btnCloseLed
);
this
.
groupTest
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
276
);
this
.
groupTest
.
Name
=
"groupTest"
;
this
.
groupTest
.
Size
=
new
System
.
Drawing
.
Size
(
3
49
,
339
);
this
.
groupTest
.
Size
=
new
System
.
Drawing
.
Size
(
3
64
,
339
);
this
.
groupTest
.
TabIndex
=
110
;
this
.
groupTest
.
TabStop
=
false
;
this
.
groupTest
.
Text
=
"灯条测试"
;
...
...
@@ -588,16 +589,29 @@
//
// groupBox3
//
this
.
groupBox3
.
Controls
.
Add
(
this
.
linkLabel1
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
btnOpenSLed
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
btnCloseSLed
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
button5
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
203
);
this
.
groupBox3
.
Name
=
"groupBox3"
;
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
3
49
,
69
);
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
3
64
,
69
);
this
.
groupBox3
.
TabIndex
=
111
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Text
=
"状态灯"
;
//
// linkLabel1
//
this
.
linkLabel1
.
AutoSize
=
true
;
this
.
linkLabel1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
linkLabel1
.
Location
=
new
System
.
Drawing
.
Point
(
302
,
31
);
this
.
linkLabel1
.
Name
=
"linkLabel1"
;
this
.
linkLabel1
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
17
);
this
.
linkLabel1
.
TabIndex
=
113
;
this
.
linkLabel1
.
TabStop
=
true
;
this
.
linkLabel1
.
Text
=
"打印状态"
;
this
.
linkLabel1
.
LinkClicked
+=
new
System
.
Windows
.
Forms
.
LinkLabelLinkClickedEventHandler
(
this
.
linkLabel1_LinkClicked
);
//
// FrmSMStore
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
@@ -628,6 +642,7 @@
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
trackBar2
)).
EndInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
trackBar1
)).
EndInit
();
this
.
groupBox3
.
ResumeLayout
(
false
);
this
.
groupBox3
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
}
...
...
@@ -678,5 +693,6 @@
private
System
.
Windows
.
Forms
.
Label
label12
;
private
System
.
Windows
.
Forms
.
Label
lblAddr
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox3
;
private
System
.
Windows
.
Forms
.
LinkLabel
linkLabel1
;
}
}
\ No newline at end of file
SmartShelf/FrmStore.cs
查看文件 @
1e8ce89
...
...
@@ -81,7 +81,7 @@ namespace SmartShelf
{
groupBox2
.
Enabled
=
true
;
lblMsg
.
Text
=
"料架未启动"
;
}
}
lblData
.
Text
=
BOXManager
.
StrMsg
;
List
<
BoxPosition
>
alls
=
new
List
<
BoxPosition
>(
PMap
.
Values
);
for
(
int
i
=
1
;
i
<=
BOXManager
.
BoxCount
;
i
++)
...
...
@@ -286,5 +286,10 @@ namespace SmartShelf
{
}
private
void
linkLabel1_LinkClicked
(
object
sender
,
LinkLabelLinkClickedEventArgs
e
)
{
LogUtil
.
info
(
"状态灯当前信息:"
+
LEDManager
.
statusMsg
);
}
}
}
SmartShelf/记录.txt
查看文件 @
1e8ce89
...
...
@@ -26,4 +26,9 @@ linePositions.csv文件里面:
RGB颜色顺序增加配置。
状态灯亮黄灯时 ,亮蓝灯即可。是硬件里直接把蓝色的替换成黄色的灯珠了。
\ No newline at end of file
状态灯亮黄灯时 ,亮蓝灯即可。是硬件里直接把蓝色的替换成黄色的灯珠了。
20200817
三色灯状态修改:
软件启动后亮绿灯,当有库位灯打开时黄灯闪烁
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论