Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.ElectricRabbit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.ElectricRabbit
Commits
14e741dd
Commit
14e741dd
authored
Dec 23, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
串口输出
parent
1fe1e67a
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
884 additions
and
35 deletions
+884
-35
VIZ.ElectricRabbit.Connection/SerialPort/Output/Signal/IOutputPackageSerialize.cs
+32
-0
VIZ.ElectricRabbit.Connection/SerialPort/Output/Signal/OutputPackageBase.cs
+254
-0
VIZ.ElectricRabbit.Connection/SerialPort/Output/Signal/Send/OutputPackage_data.cs
+209
-0
VIZ.ElectricRabbit.Connection/UDP/Algorithm/Provider/AlgorithmProvider__detect.cs
+1
-0
VIZ.ElectricRabbit.Connection/UDP/Algorithm/Signal/Recv/AlgorithmRecvPackage__detect.cs
+5
-0
VIZ.ElectricRabbit.Connection/VIZ.ElectricRabbit.Connection.csproj
+4
-0
VIZ.ElectricRabbit.Domain/Enum/OutputPackageCommands.cs
+33
-0
VIZ.ElectricRabbit.Domain/Enum/SerialPortKeys.cs
+19
-0
VIZ.ElectricRabbit.Domain/Message/Algorithm/AlgorithmDectectMessage.cs
+5
-0
VIZ.ElectricRabbit.Domain/VIZ.ElectricRabbit.Domain.csproj
+2
-0
VIZ.ElectricRabbit.Module/MainView/Controller/Output/IOutputSupport.cs
+20
-0
VIZ.ElectricRabbit.Module/MainView/Controller/Output/OutputController.cs
+118
-0
VIZ.ElectricRabbit.Module/MainView/View/MainView.xaml
+19
-9
VIZ.ElectricRabbit.Module/MainView/ViewModel/MainViewModel.cs
+56
-1
VIZ.ElectricRabbit.Module/Setup/Provider/AppSetup_SerialPort.cs
+68
-0
VIZ.ElectricRabbit.Module/VIZ.ElectricRabbit.Module.csproj
+3
-0
VIZ.ElectricRabbit.Storage/Ini/ClientConfig.cs
+6
-0
VIZ.ElectricRabbit.sln
+19
-16
VIZ.ElectricRabbit/config/config.ini
+11
-9
No files found.
VIZ.ElectricRabbit.Connection/SerialPort/Output/Signal/IOutputPackageSerialize.cs
0 → 100644
View file @
14e741dd
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.ElectricRabbit.Connection
{
/// <summary>
/// 云台数据包序列化
/// </summary>
public
interface
IOutputPackageSerialize
{
/// <summary>
/// 将对象转化为二进制数据
/// </summary>
/// <returns>二进制数据</returns>
byte
[]
ToBuffer
();
/// <summary>
/// 从二进制数据中获取数据
/// </summary>
/// <param name="buffer">二进制数据</param>
void
FromBuffer
(
byte
[]
buffer
);
/// <summary>
/// 获取校验值
/// </summary>
/// <returns>是否通过校验</returns>
byte
GetCheckValue
();
}
}
VIZ.ElectricRabbit.Connection/SerialPort/Output/Signal/OutputPackageBase.cs
0 → 100644
View file @
14e741dd
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.ElectricRabbit.Connection
{
/// <summary>
/// 云台数据包基类
/// </summary>
public
abstract
class
OutputPackageBase
:
IOutputPackageSerialize
{
/// <summary>
/// 时间 yyyy-MM-dd HH:mm:ss fff
/// </summary>
public
string
DateTime
{
get
;
set
;
}
/// <summary>
/// 获取一个字节数据的正负值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <returns>当前位序</returns>
protected
byte
GetPN_1
(
byte
[]
buffer
,
int
index
)
{
return
(
byte
)((
buffer
[
index
]
&
0
b10000000
)
>>
7
);
}
/// <summary>
/// 获取一个字节数据的值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <param name="index">当前位序</param>
/// <returns>值</returns>
protected
byte
GetValue_1
(
byte
[]
buffer
,
int
index
)
{
return
(
byte
)(
buffer
[
index
]
&
0
b01111111
);
}
/// <summary>
/// 获取两个字节数据的额正负值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <returns>当前位序</returns>
protected
byte
GetPN_2
(
byte
[]
buffer
,
int
index
)
{
return
(
byte
)((
buffer
[
index
+
1
]
&
0
b10000000
)
>>
7
);
}
/// <summary>
/// 获取两个字节数据的值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <param name="index">当前位序</param>
/// <returns>值</returns>
protected
UInt16
GetValue_2
(
byte
[]
buffer
,
int
index
)
{
return
(
UInt16
)(
buffer
[
index
]
+
((
buffer
[
index
+
1
]
&
0
b01111111
)
<<
8
));
}
/// <summary>
/// 获取两个字节数据的值,没有正负值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <param name="index">当前位序</param>
/// <returns>值</returns>
protected
UInt16
GetValue_2_NoPN
(
byte
[]
buffer
,
int
index
)
{
return
(
UInt16
)(
buffer
[
index
]
+
(
buffer
[
index
+
1
]
<<
8
));
}
/// <summary>
/// 获取两个字节数据的值,没有正负值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <param name="index">当前位序</param>
/// <returns>值</returns>
protected
Int16
GetValue_2_NoPN2
(
byte
[]
buffer
,
int
index
)
{
return
(
Int16
)(
buffer
[
index
]
+
(
buffer
[
index
+
1
]
<<
8
));
}
/// <summary>
/// 获取四个字节数据的值,没有正负值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <param name="index">当前位序</param>
/// <returns>值</returns>
protected
UInt32
GetValue_4_NoPN
(
byte
[]
buffer
,
int
index
)
{
return
(
UInt32
)(
buffer
[
index
]
+
(
buffer
[
index
+
1
]
<<
8
)
+
(
buffer
[
index
+
2
]
<<
16
)
+
(
buffer
[
index
+
3
]
<<
24
));
}
/// <summary>
/// 获取四个字节数据的值,没有正负值
/// </summary>
/// <param name="buffer">Buffer</param>
/// <param name="index">当前位序</param>
/// <returns>值</returns>
protected
Int32
GetValue_4_NoPN2
(
byte
[]
buffer
,
int
index
)
{
return
(
Int32
)(
buffer
[
index
]
+
(
buffer
[
index
+
1
]
<<
8
)
+
(
buffer
[
index
+
2
]
<<
16
)
+
(
buffer
[
index
+
3
]
<<
24
));
}
/// <summary>
/// 获取1个字节数据
/// </summary>
/// <param name="pn">符号位</param>
/// <param name="value">值</param>
/// <returns>字节数据</returns>
protected
byte
GetBuffer_1
(
byte
pn
,
byte
value
)
{
return
(
byte
)(((
UInt16
)
pn
<<
7
)
+
value
);
}
/// <summary>
/// 获取2个字节数据的低位
/// </summary>
/// <param name="pn">符号</param>
/// <param name="value">值</param>
/// <returns>低位字节</returns>
protected
byte
GetBuffer_2_low
(
byte
pn
,
UInt16
value
)
{
return
(
byte
)((
value
+
(
pn
<<
15
))
&
0
b0000000011111111
);
}
/// <summary>
/// 获取2个字节数据的高位
/// </summary>
/// <param name="pn">符号</param>
/// <param name="value">值</param>
/// <returns>高位字节</returns>
protected
byte
GetBuffer_2_heigh
(
byte
pn
,
UInt16
value
)
{
return
(
byte
)(((
value
+
(
pn
<<
15
))
&
0
b1111111100000000
)
>>
8
);
}
/// <summary>
/// 获取2个字节数据的低位
/// </summary>
/// <param name="value">值</param>
/// <returns>低位字节</returns>
protected
byte
GetBuffer_2_low
(
UInt16
value
)
{
return
(
byte
)(
value
&
0
b0000000011111111
);
}
/// <summary>
/// 获取2个字节数据的高位
/// </summary>
/// <param name="value">值</param>
/// <returns>高位数据</returns>
protected
byte
GetBuffer_2_heigh
(
UInt16
value
)
{
return
(
byte
)((
value
&
0
b1111111100000000
)
>>
8
);
}
/// <summary>
/// 获取2个字节数据的低位
/// </summary>
/// <param name="value">值</param>
/// <returns>低位字节</returns>
protected
byte
GetBuffer_2_low
(
Int16
value
)
{
return
(
byte
)(
value
&
0
b0000000011111111
);
}
/// <summary>
/// 获取2个字节数据的高位
/// </summary>
/// <param name="value">值</param>
/// <returns>高位数据</returns>
protected
byte
GetBuffer_2_heigh
(
Int16
value
)
{
return
(
byte
)((
value
&
0
b1111111100000000
)
>>
8
);
}
/// <summary>
/// 获取4个字节数据
/// </summary>
/// <param name="value">值</param>
/// <returns>字节数据</returns>
protected
byte
[]
GetBuffer_4
(
UInt32
value
)
{
// 00000000
// 11111111
byte
[]
result
=
new
byte
[
4
];
result
[
0
]
=
(
byte
)(
value
&
0
b00000000000000000000000011111111
);
result
[
1
]
=
(
byte
)((
value
&
0
b00000000000000001111111100000000
)
>>
8
);
result
[
2
]
=
(
byte
)((
value
&
0
b00000000111111110000000000000000
)
>>
16
);
result
[
3
]
=
(
byte
)((
value
&
0
b11111111000000000000000000000000
)
>>
24
);
return
result
;
}
/// <summary>
/// 获取4个字节数据
/// </summary>
/// <param name="value">值</param>
/// <returns>字节数据</returns>
protected
byte
[]
GetBuffer_4
(
Int32
value
)
{
// 00000000
// 11111111
byte
[]
result
=
new
byte
[
4
];
result
[
0
]
=
(
byte
)(
value
&
0
b00000000000000000000000011111111
);
result
[
1
]
=
(
byte
)((
value
&
0
b00000000000000001111111100000000
)
>>
8
);
result
[
2
]
=
(
byte
)((
value
&
0
b00000000111111110000000000000000
)
>>
16
);
result
[
3
]
=
(
byte
)((
value
&
0
b11111111000000000000000000000000
)
>>
24
);
return
result
;
}
/// <summary>
/// 获取带PN的值
/// </summary>
/// <param name="pn">符号位</param>
/// <param name="value">值</param>
/// <returns>带PN的值</returns>
protected
UInt16
GetValueWithPN
(
byte
pn
,
byte
value
)
{
return
(
UInt16
)((
pn
<<
7
)
+
value
);
}
/// <summary>
/// 获取带PN的值
/// </summary>
/// <param name="pn">符号位</param>
/// <param name="value">值</param>
/// <returns>带PN的值</returns>
protected
UInt16
GetValueWithPN
(
byte
pn
,
UInt16
value
)
{
return
(
UInt16
)(
value
+
((
UInt16
)(
pn
)
<<
15
));
}
/// <summary>
/// 将对象转化为二进制数据
/// </summary>
/// <returns>二进制数据</returns>
public
abstract
byte
[]
ToBuffer
();
/// <summary>
/// 从二进制数据中获取数据
/// </summary>
/// <param name="buffer">二进制数据</param>
public
abstract
void
FromBuffer
(
byte
[]
buffer
);
/// <summary>
/// 获取校验值
/// </summary>
/// <returns>是否通过校验</returns>
public
abstract
byte
GetCheckValue
();
}
}
VIZ.ElectricRabbit.Connection/SerialPort/Output/Signal/Send/OutputPackage_data.cs
0 → 100644
View file @
14e741dd
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Web.UI
;
using
VIZ.ElectricRabbit.Domain
;
using
VIZ.Framework.Connection
;
namespace
VIZ.ElectricRabbit.Connection
{
/// <summary>
/// 输出数据
/// </summary>
public
class
OutputPackage_data
:
OutputPackageBase
{
/// <summary>
/// 同步帧头 固定值 0xA5
/// </summary>
[
ConnBitLength
(
8
)]
public
byte
SyncHead_1
{
get
;
set
;
}
/// <summary>
/// 同步帧头 固定值 0x2F
/// </summary>
[
ConnBitLength
(
8
)]
public
byte
SyncHead_2
{
get
;
set
;
}
/// <summary>
/// 状态字
/// <see cref="OutputPackageCommands"/>
/// </summary>
[
ConnBitLength
(
8
)]
public
byte
Command
{
get
;
set
;
}
/// <summary>
/// 俯仰角度值
/// </summary>
[
ConnBitLength
(
16
)]
public
Int16
Vertical
{
get
;
set
;
}
/// <summary>
/// 方位角度值
/// </summary>
[
ConnBitLength
(
16
)]
public
Int16
Horizontal
{
get
;
set
;
}
/// <summary>
/// 横滚角度值
/// </summary>
[
ConnBitLength
(
16
)]
public
Int16
Roll
{
get
;
set
;
}
/// <summary>
/// 变焦值
/// </summary>
[
ConnBitLength
(
16
)]
public
UInt16
Zoom
{
get
;
set
;
}
/// <summary>
/// 光圈值
/// </summary>
[
ConnBitLength
(
16
)]
public
UInt16
Aperture
{
get
;
set
;
}
/// <summary>
/// 聚焦值
/// </summary>
[
ConnBitLength
(
16
)]
public
UInt16
Focus
{
get
;
set
;
}
/// <summary>
/// 辅助控制指令 方向 0 - 右, 1 左
/// </summary>
[
ConnBitLength
(
1
)]
public
byte
HelpCommand_PN
{
get
;
set
;
}
/// <summary>
/// 辅助控制指令
/// </summary>
[
ConnBitLength
(
15
)]
public
UInt16
HelpCommand
{
get
;
set
;
}
/// <summary>
/// 心跳指令
/// </summary>
[
ConnBitLength
(
8
)]
public
byte
Heart
{
get
;
set
;
}
/// <summary>
/// 校验和
/// (序号1+……+序号52)&0xFF
/// </summary>
[
ConnBitLength
(
8
)]
public
byte
Check
{
get
;
set
;
}
/// <summary>
/// 将对象转化为二进制数据
/// </summary>
/// <returns>二进制数据</returns>
public
override
byte
[]
ToBuffer
()
{
byte
[]
buffer
=
new
byte
[
53
];
int
index
=
0
;
// 同步帧头 1
buffer
[
index
++]
=
this
.
SyncHead_1
;
// 同步帧头 2
buffer
[
index
++]
=
this
.
SyncHead_2
;
// 命令字
buffer
[
index
++]
=
this
.
Command
;
// 俯仰
buffer
[
index
++]
=
this
.
GetBuffer_2_low
(
this
.
Vertical
);
buffer
[
index
++]
=
this
.
GetBuffer_2_heigh
(
this
.
Vertical
);
// 方位
buffer
[
index
++]
=
this
.
GetBuffer_2_low
(
this
.
Horizontal
);
buffer
[
index
++]
=
this
.
GetBuffer_2_heigh
(
this
.
Horizontal
);
// 横滚
buffer
[
index
++]
=
this
.
GetBuffer_2_low
(
this
.
Roll
);
buffer
[
index
++]
=
this
.
GetBuffer_2_heigh
(
this
.
Roll
);
// 变焦
buffer
[
index
++]
=
this
.
GetBuffer_2_low
(
this
.
Zoom
);
buffer
[
index
++]
=
this
.
GetBuffer_2_heigh
(
this
.
Zoom
);
// 光圈
buffer
[
index
++]
=
this
.
GetBuffer_2_low
(
this
.
Aperture
);
buffer
[
index
++]
=
this
.
GetBuffer_2_heigh
(
this
.
Aperture
);
// 聚焦
buffer
[
index
++]
=
this
.
GetBuffer_2_low
(
this
.
Focus
);
buffer
[
index
++]
=
this
.
GetBuffer_2_heigh
(
this
.
Focus
);
// 辅助控制指令
buffer
[
index
++]
=
this
.
GetBuffer_2_low
(
this
.
HelpCommand_PN
,
this
.
HelpCommand
);
buffer
[
index
++]
=
this
.
GetBuffer_2_heigh
(
this
.
HelpCommand_PN
,
this
.
HelpCommand
);
// 备用
index
+=
30
;
// 心跳
buffer
[
index
++]
=
this
.
Heart
;
// 校验值
buffer
[
index
++]
=
this
.
Check
;
return
buffer
;
}
/// <summary>
/// 从二进制数据中获取数据
/// </summary>
/// <param name="buffer">二进制数据</param>
public
override
void
FromBuffer
(
byte
[]
buffer
)
{
int
index
=
0
;
// 同步帧头 1
this
.
SyncHead_1
=
buffer
[
index
++];
// 同步帧头 2
this
.
SyncHead_2
=
buffer
[
index
++];
// 命令字
this
.
Command
=
buffer
[
index
++];
// 俯仰
this
.
Vertical
=
this
.
GetValue_2_NoPN2
(
buffer
,
index
);
index
+=
2
;
// 方位
this
.
Horizontal
=
this
.
GetValue_2_NoPN2
(
buffer
,
index
);
index
+=
2
;
// 横滚
this
.
Roll
=
this
.
GetValue_2_NoPN2
(
buffer
,
index
);
index
+=
2
;
// 变焦
this
.
Zoom
=
this
.
GetValue_2_NoPN
(
buffer
,
index
);
index
+=
2
;
// 光圈
this
.
Aperture
=
this
.
GetValue_2_NoPN
(
buffer
,
index
);
index
+=
2
;
// 聚焦
this
.
Focus
=
this
.
GetValue_2_NoPN
(
buffer
,
index
);
index
+=
2
;
// 辅助控制指令
this
.
HelpCommand_PN
=
this
.
GetPN_2
(
buffer
,
index
);
this
.
HelpCommand
=
this
.
GetValue_2
(
buffer
,
index
);
index
+=
2
;
// 备用
index
+=
30
;
// 心跳
this
.
Heart
=
buffer
[
index
++];
// 校验值
this
.
Check
=
buffer
[
index
++];
}
/// <summary>
/// 获取校验值
/// </summary>
/// <returns>是否通过校验</returns>
public
override
byte
GetCheckValue
()
{
byte
[]
buffer
=
this
.
ToBuffer
();
long
sum
=
0
;
for
(
int
i
=
0
;
i
<
buffer
.
Length
-
1
;
i
++)
{
sum
+=
buffer
[
i
];
}
return
(
byte
)(
sum
&
0xFF
);
}
}
}
VIZ.ElectricRabbit.Connection/UDP/Algorithm/Provider/AlgorithmProvider__detect.cs
View file @
14e741dd
...
...
@@ -31,6 +31,7 @@ namespace VIZ.ElectricRabbit.Connection
AlgorithmDectectMessage
msg
=
new
AlgorithmDectectMessage
();
msg
.
target_bbox
=
package
.
target_bbox
;
msg
.
center_x
=
package
.
center_x
;
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
}
...
...
VIZ.ElectricRabbit.Connection/UDP/Algorithm/Signal/Recv/AlgorithmRecvPackage__detect.cs
View file @
14e741dd
...
...
@@ -21,5 +21,10 @@ namespace VIZ.ElectricRabbit.Connection
/// 目标框(左上角x,y,右下角x,y)
/// </summary>
public
List
<
int
>
target_bbox
{
get
;
set
;
}
/// <summary>
/// 目标中心
/// </summary>
public
double
center_x
{
get
;
set
;
}
}
}
VIZ.ElectricRabbit.Connection/VIZ.ElectricRabbit.Connection.csproj
View file @
14e741dd
...
...
@@ -68,6 +68,9 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SerialPort\Output\Signal\IOutputPackageSerialize.cs" />
<Compile Include="SerialPort\Output\Signal\OutputPackageBase.cs" />
<Compile Include="SerialPort\Output\Signal\Send\OutputPackage_data.cs" />
<Compile Include="UDP\Algorithm\AlgorithmPackageBase.cs" />
<Compile Include="UDP\Algorithm\AlgorithmPackageProvider.cs" />
<Compile Include="UDP\Algorithm\Enum\AlgorithmPackageSignal.cs" />
...
...
@@ -109,6 +112,7 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Folder Include="SerialPort\Output\Provider\" />
<Folder Include="UDP\Algorithm\Info\" />
<Folder Include="UDP\Algorithm\Sender\" />
<Folder Include="UDP\Algorithm\Signal\Send\" />
...
...
VIZ.ElectricRabbit.Domain/Enum/OutputPackageCommands.cs
0 → 100644
View file @
14e741dd
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.ElectricRabbit.Domain
{
/// <summary>
/// 输出命令
/// </summary>
public
enum
OutputPackageCommands
:
byte
{
/// <summary>
/// 无指令
/// </summary>
[
Description
(
"无指令"
)]
None
=
0x00
,
/// <summary>
/// 有指令
/// </summary>
[
Description
(
"有指令"
)]
Command
=
0x01
,
/// <summary>
/// 复位
/// </summary>
[
Description
(
"复位"
)]
Reset
=
0x02
}
}
VIZ.ElectricRabbit.Domain/Enum/SerialPortKeys.cs
0 → 100644
View file @
14e741dd
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.ElectricRabbit.Domain
{
/// <summary>
/// 串口键
/// </summary>
public
class
SerialPortKeys
{
/// <summary>
/// 输出
/// </summary>
public
const
string
Output
=
"Output"
;
}
}
VIZ.ElectricRabbit.Domain/Message/Algorithm/AlgorithmDectectMessage.cs
View file @
14e741dd
...
...
@@ -15,5 +15,10 @@ namespace VIZ.ElectricRabbit.Domain
/// 目标框
/// </summary>
public
List
<
int
>
target_bbox
{
get
;
set
;
}
/// <summary>
/// 目标中心
/// </summary>
public
double
center_x
{
get
;
set
;
}
}
}
VIZ.ElectricRabbit.Domain/VIZ.ElectricRabbit.Domain.csproj
View file @
14e741dd
...
...
@@ -69,6 +69,8 @@
<ItemGroup>
<Compile Include="ApplicationConstant.cs" />
<Compile Include="ApplicationDomainEx.cs" />
<Compile Include="Enum\OutputPackageCommands.cs" />
<Compile Include="Enum\SerialPortKeys.cs" />
<Compile Include="Info\ClientConfigInfo.cs" />
<Compile Include="Message\Algorithm\AlgorithmDectectMessage.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
...
...
VIZ.ElectricRabbit.Module/MainView/Controller/Output/IOutputSupport.cs
0 → 100644
View file @
14e741dd
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VIZ.Framework.Common
;
namespace
VIZ.ElectricRabbit.Module
{
/// <summary>
/// 输出支持
/// </summary>
public
interface
IOutputSupport
{
/// <summary>
/// 算法偏差值
/// </summary>
double
AlgorithmDifferenceValue
{
get
;
}
}
}
VIZ.ElectricRabbit.Module/MainView/Controller/Output/OutputController.cs
0 → 100644
View file @
14e741dd
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VIZ.ElectricRabbit.Connection
;
using
VIZ.ElectricRabbit.Domain
;
using
VIZ.Framework.Connection
;
using
VIZ.Framework.Core
;
namespace
VIZ.ElectricRabbit.Module
{
/// <summary>
/// 输出控制器
/// </summary>
public
class
OutputController
:
IDisposable
{
/// <summary>
/// 发送间隔,单位:毫秒
/// </summary>
public
const
int
SEND_WAIT
=
10
;
/// <summary>
/// 输出控制器
/// </summary>
/// <param name="support">支持</param>
public
OutputController
(
IOutputSupport
support
)
{
this
.
Support
=
support
;
ApplicationDomainEx
.
ObjectPoolManager
.
Add
(
"VIZ.ElectricRabbit.Module.OutputController"
,
this
);
}
/// <summary>
/// 支持
/// </summary>
public
IOutputSupport
Support
{
get
;
private
set
;
}
/// <summary>
/// 任务信息
/// </summary>
private
TaskInfo
taskInfo
;
/// <summary>
/// 任务
/// </summary>
private
Task
task
;
/// <summary>
/// 心跳指令
/// </summary>
private
int
heart
;
/// <summary>
/// 启动输出控制
/// </summary>
public
void
Start
()
{
this
.
taskInfo
=
new
TaskInfo
();
this
.
task
=
Task
.
Run
(
this
.
Execute
);
}
/// <summary>
/// 销毁
/// </summary>
public
void
Dispose
()
{
if
(
this
.
taskInfo
!=
null
)
{
this
.
taskInfo
.
IsCancel
=
true
;
}
this
.
taskInfo
=
null
;
this
.
task
=
null
;
}
/// <summary>
/// 执行
/// </summary>
private
void
Execute
()
{
TaskInfo
taskInfo
=
this
.
taskInfo
;
while
(!
taskInfo
.
IsCancel
)
{
if
(
ConnectionManager
.
SerialPortConnection
==
null
)
{
System
.
Threading
.
Thread
.
Sleep
(
SEND_WAIT
);
continue
;
}
SerialPortEndpointManager
endpoint
=
ConnectionManager
.
SerialPortConnection
.
GetEndpointManager
(
SerialPortKeys
.
Output
);
if
(
endpoint
==
null
)
{
System
.
Threading
.
Thread
.
Sleep
(
SEND_WAIT
);
continue
;
}
OutputPackage_data
package
=
new
OutputPackage_data
();
package
.
SyncHead_1
=
0xA5
;
package
.
SyncHead_2
=
0x2F
;
package
.
HelpCommand_PN
=
this
.
Support
.
AlgorithmDifferenceValue
<
0
?
(
byte
)
1
:
(
byte
)
0
;
package
.
HelpCommand
=
(
UInt16
)
Math
.
Abs
(
this
.
Support
.
AlgorithmDifferenceValue
);
package
.
Heart
=
(
byte
)
this
.
heart
;
this
.
heart
++;
if
(
this
.
heart
>
255
)
{
this
.
heart
=
0
;
}
endpoint
.
Send
(
package
.
ToBuffer
());
System
.
Threading
.
Thread
.
Sleep
(
SEND_WAIT
);
}
}
}
}
VIZ.ElectricRabbit.Module/MainView/View/MainView.xaml
View file @
14e741dd
...
...
@@ -59,15 +59,25 @@
<ColumnDefinition Width="Auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- 提示区域 -->
<fcommon:FlashingBorder IsFlashingEnabled="{Binding Path=SettingViewModel.IsFlashingEnabled}"
FlashingInterval="{Binding Path=SettingViewModel.FlashingInterval,Converter={StaticResource Double2TimeSpanConverter}}">
<common:ArrowShape ArrowMaxHeight="120" ArrowMaxWidth="120" ArrowMinHeigh="60" ArrowMinWidth="60"
RectangleMaxHeigh="40" RectangleMaxWidth="1200" RectangleMinHeigh="5" RectangleMinWidth="20"
SafeRectangleWidth="400" RectangleHeightProportion="0.4"
DifferenceSafeValue="{Binding SettingViewModel.SafeDistance}" DifferenceMaxValue="1920"
DifferenceValue="{Binding DifferenceValue,Mode=OneWay}"
LeftBrush="#066FA5" RightBrush="#F70044" SafeBrush="#11CD86"></common:ArrowShape>
</fcommon:FlashingBorder>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!-- 中心值 -->
<TextBlock Text="{Binding Path=AlgorithmCenterX}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Red" FontSize="16"></TextBlock>
<!-- 箭头 -->
<fcommon:FlashingBorder IsFlashingEnabled="{Binding Path=SettingViewModel.IsFlashingEnabled}" Grid.Row="1"
FlashingInterval="{Binding Path=SettingViewModel.FlashingInterval,Converter={StaticResource Double2TimeSpanConverter}}">
<common:ArrowShape ArrowMaxHeight="120" ArrowMaxWidth="120" ArrowMinHeigh="60" ArrowMinWidth="60"
RectangleMaxHeigh="40" RectangleMaxWidth="1200" RectangleMinHeigh="5" RectangleMinWidth="20"
SafeRectangleWidth="400" RectangleHeightProportion="0.4"
DifferenceSafeValue="{Binding SettingViewModel.SafeDistance}" DifferenceMaxValue="1920"
DifferenceValue="{Binding DifferenceValue,Mode=OneWay}"
LeftBrush="#066FA5" RightBrush="#F70044" SafeBrush="#11CD86"></common:ArrowShape>
</fcommon:FlashingBorder>
</Grid>
<fcommon:DebugBorder HorizontalAlignment="Left" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal">
<TextBlock Text="算法FPS:" Foreground="Red" FontSize="20" Margin="10,0,10,0"></TextBlock>
...
...
VIZ.ElectricRabbit.Module/MainView/ViewModel/MainViewModel.cs
View file @
14e741dd
...
...
@@ -14,13 +14,16 @@ namespace VIZ.ElectricRabbit.Module
/// <summary>
/// 主视图模型
/// </summary>
public
class
MainViewModel
:
ViewModelBase
public
class
MainViewModel
:
ViewModelBase
,
IOutputSupport
{
public
MainViewModel
()
{
// 初始化命令
this
.
InitCommand
();
// 初始化控制器
this
.
InitController
();
// 初始化FPS
this
.
InitFPS
();
...
...
@@ -56,6 +59,25 @@ namespace VIZ.ElectricRabbit.Module
this
.
AlgorithmFPS
.
Start
();
}
/// <summary>
/// 初始化控制器
/// </summary>
private
void
InitController
()
{
this
.
outputController
=
new
OutputController
(
this
);
this
.
outputController
.
Start
();
}
// ================================================================================
// Field
// ================================================================================
/// <summary>
/// 输出控制器
/// </summary>
private
OutputController
outputController
;
// ================================================================================
// Property
// ================================================================================
...
...
@@ -102,6 +124,20 @@ namespace VIZ.ElectricRabbit.Module
#
endregion
#
region
AlgorithmDifferenceValue
--
算法目标框与中心轴的偏差
private
double
algorithmDifferenceValue
;
/// <summary>
/// 算法目标框与中心轴的偏差
/// </summary>
public
double
AlgorithmDifferenceValue
{
get
{
return
algorithmDifferenceValue
;
}
set
{
algorithmDifferenceValue
=
value
;
this
.
RaisePropertySaveChanged
(
nameof
(
AlgorithmDifferenceValue
));
}
}
#
endregion
#
region
AlgorithmFPS
--
算法
FPS
private
FPSHelper
algorithmFPS
;
...
...
@@ -116,6 +152,20 @@ namespace VIZ.ElectricRabbit.Module
#
endregion
#
region
AlgorithmCenterX
--
算法中心值
private
double
algorithmCenterX
;
/// <summary>
/// 算法中心值
/// </summary>
public
double
AlgorithmCenterX
{
get
{
return
algorithmCenterX
;
}
set
{
algorithmCenterX
=
value
;
this
.
RaisePropertySaveChanged
(
nameof
(
AlgorithmCenterX
));
}
}
#
endregion
// ================================================================================
// Command
// ================================================================================
...
...
@@ -271,6 +321,9 @@ namespace VIZ.ElectricRabbit.Module
{
view
.
video
.
ClearTrackingBox
();
// 更新FPS
this
.
AlgorithmFPS
.
CalcFps
();
return
;
}
...
...
@@ -294,6 +347,8 @@ namespace VIZ.ElectricRabbit.Module
// 更新差值
double
center
=
left
+
(
right
-
left
)
/
2d
;
this
.
DifferenceValue
=
center
-
this
.
SettingViewModel
.
SafeAxis
;
this
.
AlgorithmCenterX
=
msg
.
center_x
;
this
.
AlgorithmDifferenceValue
=
center
-
this
.
AlgorithmCenterX
;
// 更新FPS
this
.
AlgorithmFPS
.
CalcFps
();
...
...
VIZ.ElectricRabbit.Module/Setup/Provider/AppSetup_SerialPort.cs
0 → 100644
View file @
14e741dd
using
log4net
;
using
System
;
using
System.Collections.Generic
;
using
System.IO.Ports
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Media
;
using
VIZ.ElectricRabbit.Connection
;
using
VIZ.ElectricRabbit.Domain
;
using
VIZ.ElectricRabbit.Storage
;
using
VIZ.Framework.Connection
;
using
VIZ.Framework.Core
;
using
VIZ.Framework.Domain
;
using
VIZ.Framework.Module
;
namespace
VIZ.ElectricRabbit.Module
{
/// <summary>
/// 应用程序启动 -- 初始化串口
/// </summary>
public
class
AppSetup_SerialPort
:
AppSetupBase
{
/// <summary>
/// 日志
/// </summary>
private
static
ILog
log
=
LogManager
.
GetLogger
(
typeof
(
AppSetup_SerialPort
));
/// <summary>
/// 描述
/// </summary>
public
override
string
Detail
{
get
;
}
=
"应用程序启动 -- 串口"
;
/// <summary>
/// 输出串口号
/// </summary>
private
readonly
string
CLIENT_OUTPUT_SERIAL_PORT
=
ApplicationDomainEx
.
IniStorage
.
GetValue
<
ClientConfig
,
string
>(
p
=>
p
.
CLIENT_OUTPUT_SERIAL_PORT
);
/// <summary>
/// 执行启动
/// </summary>
/// <param name="context">应用程序启动上下文</param>
/// <returns>是否成功执行</returns>
public
override
bool
Setup
(
AppSetupContext
context
)
{
ConnectionManager
.
SerialPortConnection
=
new
SerialPortConnection
();
// 下行
SerialPortEndpointManager
down_endpoint_manager
=
new
SerialPortEndpointManager
(
SerialPortKeys
.
Output
,
CLIENT_OUTPUT_SERIAL_PORT
,
115200
,
Parity
.
None
,
8
,
StopBits
.
One
);
//down_endpoint_manager.PackageProvider = new GimbalPackageDownProvider(53, new byte[] { 0xA5, 0xE7 }, SerialPortKeys.Output);
ConnectionManager
.
SerialPortConnection
.
AddEndpointManager
(
down_endpoint_manager
);
down_endpoint_manager
.
Open
();
return
true
;
}
/// <summary>
/// 执行关闭
/// </summary>
/// <param name="context">应用程序启动上下文</param>
public
override
void
Shutdown
(
AppSetupContext
context
)
{
ConnectionManager
.
SerialPortConnection
.
Dispose
();
}
}
}
\ No newline at end of file
VIZ.ElectricRabbit.Module/VIZ.ElectricRabbit.Module.csproj
View file @
14e741dd
...
...
@@ -106,6 +106,8 @@
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="MainView\Controller\Output\IOutputSupport.cs" />
<Compile Include="MainView\Controller\Output\OutputController.cs" />
<Compile Include="MainView\ViewModel\MainViewModel.cs" />
<Compile Include="MainView\View\MainView.xaml.cs">
<DependentUpon>MainView.xaml</DependentUpon>
...
...
@@ -127,6 +129,7 @@
<Compile Include="SettingView\View\SettingView.xaml.cs">
<DependentUpon>SettingView.xaml</DependentUpon>
</Compile>
<Compile Include="Setup\Provider\AppSetup_SerialPort.cs" />
<Compile Include="Setup\Provider\AppSetup_InitUDP.cs" />
<Compile Include="Setup\Provider\AppSetup_InitOpenCV.cs" />
<Compile Include="Setup\Provider\AppSetup_InitINI.cs" />
...
...
VIZ.ElectricRabbit.Storage/Ini/ClientConfig.cs
View file @
14e741dd
...
...
@@ -72,5 +72,11 @@ namespace VIZ.ElectricRabbit.Storage
/// </summary>
[
Ini
(
Section
=
"Client"
,
DefaultValue
=
"#FF00FF00"
,
Type
=
typeof
(
Color
))]
public
string
CLIENT_SAFE_COLOR
{
get
;
set
;
}
/// <summary>
/// 输出串口号
/// </summary>
[
Ini
(
Section
=
"Client"
,
DefaultValue
=
"COM1"
,
Type
=
typeof
(
string
))]
public
string
CLIENT_OUTPUT_SERIAL_PORT
{
get
;
set
;
}
}
}
VIZ.ElectricRabbit.sln
View file @
14e741dd
...
...
@@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 17.3.32825.248
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "00-Doc", "00-Doc", "{1932D07C-1DF0-466F-99C0-D0A1E6A81E5E}"
ProjectSection(SolutionItems) = preProject
Doc\数据格式.docx = Doc\数据格式.docx
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "05-Lib", "05-Lib", "{65A5ED4D-A948-43D0-95E0-E4E1C1719F18}"
EndProject
...
...
@@ -145,64 +148,64 @@ Global
{26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Debug|x64.Build.0 = Debug|x64
{26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Release|Any CPU.Build.0 = Release|Any CPU
{26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Release|x64.ActiveCfg = Release|
Any CPU
{26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Release|x64.Build.0 = Release|
Any CPU
{26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Release|x64.ActiveCfg = Release|
x64
{26F6DA5C-D90F-441D-95BC-3D4CD6497214}.Release|x64.Build.0 = Release|
x64
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Debug|x64.ActiveCfg = Debug|x64
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Debug|x64.Build.0 = Debug|x64
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Release|Any CPU.Build.0 = Release|Any CPU
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Release|x64.ActiveCfg = Release|
Any CPU
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Release|x64.Build.0 = Release|
Any CPU
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Release|x64.ActiveCfg = Release|
x64
{DEE77458-F619-4988-A0E7-3C831A78BB14}.Release|x64.Build.0 = Release|
x64
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Debug|x64.ActiveCfg = Debug|x64
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Debug|x64.Build.0 = Debug|x64
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Release|Any CPU.Build.0 = Release|Any CPU
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Release|x64.ActiveCfg = Release|
Any CPU
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Release|x64.Build.0 = Release|
Any CPU
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Release|x64.ActiveCfg = Release|
x64
{4337796C-5B11-4DBE-B19B-9860683B9AD3}.Release|x64.Build.0 = Release|
x64
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Debug|x64.ActiveCfg = Debug|x64
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Debug|x64.Build.0 = Debug|x64
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Release|Any CPU.Build.0 = Release|Any CPU
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Release|x64.ActiveCfg = Release|
Any CPU
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Release|x64.Build.0 = Release|
Any CPU
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Release|x64.ActiveCfg = Release|
x64
{688B4EEA-9CB8-488A-B84F-4522DCC4515D}.Release|x64.Build.0 = Release|
x64
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Debug|x64.ActiveCfg = Debug|x64
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Debug|x64.Build.0 = Debug|x64
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Release|Any CPU.Build.0 = Release|Any CPU
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Release|x64.ActiveCfg = Release|
Any CPU
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Release|x64.Build.0 = Release|
Any CPU
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Release|x64.ActiveCfg = Release|
x64
{15765169-33F9-441E-9939-EB6D8F9E6DFC}.Release|x64.Build.0 = Release|
x64
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Debug|Any CPU.Build.0 = Debug|Any CPU
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Debug|x64.ActiveCfg = Debug|x64
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Debug|x64.Build.0 = Debug|x64
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Release|Any CPU.ActiveCfg = Release|Any CPU
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Release|Any CPU.Build.0 = Release|Any CPU
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Release|x64.ActiveCfg = Release|
Any CPU
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Release|x64.Build.0 = Release|
Any CPU
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Release|x64.ActiveCfg = Release|
x64
{013482B6-E206-47FD-B4E8-FC4BC8421127}.Release|x64.Build.0 = Release|
x64
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Debug|x64.ActiveCfg = Debug|x64
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Debug|x64.Build.0 = Debug|x64
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Release|Any CPU.Build.0 = Release|Any CPU
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Release|x64.ActiveCfg = Release|
Any CPU
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Release|x64.Build.0 = Release|
Any CPU
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Release|x64.ActiveCfg = Release|
x64
{D698F0A0-D1A6-404F-9083-1F50C6C76565}.Release|x64.Build.0 = Release|
x64
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Debug|x64.ActiveCfg = Debug|x64
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Debug|x64.Build.0 = Debug|x64
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Release|Any CPU.Build.0 = Release|Any CPU
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Release|x64.ActiveCfg = Release|
Any CPU
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Release|x64.Build.0 = Release|
Any CPU
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Release|x64.ActiveCfg = Release|
x64
{B8F27D49-E5BB-408C-871E-DF023A7B2911}.Release|x64.Build.0 = Release|
x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
VIZ.ElectricRabbit/config/config.ini
View file @
14e741dd
...
...
@@ -3,7 +3,7 @@
; ============================================================
[Application]
; 是否是调试模式
APPLICATION_IS_DEBUG
=
tru
e
APPLICATION_IS_DEBUG
=
fals
e
; ============================================================
; === Video ===
; ============================================================
...
...
@@ -17,20 +17,22 @@ VIDEO_RENDER_WAIT=10
; OpenCV流索引
CLIENT_OPEN_CV_STREAM_INDEX
=
1
; 本机绑定IP
CLIENT_UDP_BINDING_IP
=
1
92.168.3.1
1
CLIENT_UDP_BINDING_IP
=
1
27.0.0.
1
; 本机绑定端口
CLIENT_UDP_BINDING_PORT
=
8701
; 安全范围(单位:像素)
CLIENT_SAFE_DISTANCE
=
20
0
CLIENT_SAFE_DISTANCE
=
20
; 安全轴位置(单位:像素)
CLIENT_SAFE_AXIS
=
96
0
CLIENT_SAFE_AXIS
=
32
0
; 是否使用闪烁
CLIENT_IS_FLASHING_ENABLED
=
f
alse
CLIENT_IS_FLASHING_ENABLED
=
F
alse
; 闪烁间隔(单位:秒)
CLIENT_FLASHING_INTERVAL
=
1
; 箭头向左颜色(格式:#AARRGGBB)
CLIENT_LEFT_COLOR
=
#
FF0000FF
CLIENT_LEFT_COLOR
=
#
00000000
; 箭头向右颜色(格式:#AARRGGBB)
CLIENT_RIGHT_COLOR=#
FFFF
0000
CLIENT_RIGHT_COLOR=#
0000
0000
; 箭头安全颜色(格式:#AARRGGBB)
CLIENT_SAFE_COLOR
=
#FF00FF00
\ No newline at end of file
CLIENT_SAFE_COLOR
=
#00000000
; 输出串口号
CLIENT_OUTPUT_SERIAL_PORT=COM1
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment